0

i saved SERVER time manually for specific options... i want them to convert to user-specific time for site (the time that is set in GENERAL OPTIONS).

for example, i want 141234567890 to be converted in like this: 13:25:57 20-05-2016

the_date and such functions are only for post...

2 Answers 2

2

The correct function to use for what you describe would be date_i18n() WordPress function.

It will produce output that is correct for timezone configured in WordPress and also localized if necessary.

0

found WP built-in function get_date_from_gmt :

get_date_from_gmt('13:49:18 26/05/2016') or

get_date_from_gmt(strtotime('13:49:18 26/05/2016'))

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.