[wp-trac] [WordPress Trac] #25555: get_comment_time('c') and date_i18n('c') uses UTC timezone only
WordPress Trac
noreply at wordpress.org
Thu Oct 10 14:18:23 UTC 2013
#25555: get_comment_time('c') and date_i18n('c') uses UTC timezone only
--------------------------+------------------------
Reporter: raubvogel | Owner:
Type: defect (bug) | Status: closed
Priority: normal | Milestone:
Component: Date/Time | Version: 3.6.1
Severity: normal | Resolution: duplicate
Keywords: |
--------------------------+------------------------
Changes (by johnbillion):
* keywords: needs-patch =>
* status: new => closed
* resolution: => duplicate
* milestone: Awaiting Review =>
Comment:
`date_i18n()` doesn't take into account the site's timezone because it's a
localisation function. The function is intended to format the date string
according to the site's locale.
To get the date in the site's specified timezone you should use
`get_date_from_gmt()`. See the example given in the comments on #25331.
--
Ticket URL: <http://core.trac.wordpress.org/ticket/25555#comment:1>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list