Hallo, i’m trying to find out what is the right way to save and display a date. I need this for a plugin that i’m developing.
At the moment i get the current date with:
then i save this date into a DATETIME field in the database.
The date in the database is perfect and matches the other date in wordpress, just like the comment_date field in the wp_comments table.
When i want to display the date i use this:
get_gmt_from_date($result['date'],get_option('date_format').' '.get_option('time_format') )
But there is something wrong here, the resulting format is ok, but the displayed date is 1 hour before the right date.
I’m working with the Setting -> General -> Timezone = UTC+1
- The topic ‘Problem with DATE and related functions’ is closed to new replies.