[wp-trac] [WordPress Trac] #21653: Introduce current_date() (was: Fix current_date())

WordPress Trac noreply at wordpress.org
Thu Jan 14 00:14:06 UTC 2016


#21653: Introduce current_date()
------------------------------+---------------------
 Reporter:  johnbillion       |       Owner:  nacin
     Type:  enhancement       |      Status:  closed
 Priority:  low               |   Milestone:  3.9
Component:  Date/Time         |     Version:
 Severity:  normal            |  Resolution:  fixed
 Keywords:  has-patch commit  |     Focuses:
------------------------------+---------------------

Comment (by johnbillion):

 @turn-on-social The `current_time()` function is explicitly designed to
 return a timestamp with the current site's timezone offset applied. Its
 return value is used as the `$timestamp` argument in functions such as
 `date()` because WordPress sets the server's timezone to UTC.

 If you need the current UTC timestampe, use `time()`.

 If you think there's a real bug here please open a new ticket with these
 details, as this ticket was closed on a completed milestone. Thanks!

--
Ticket URL: <https://core.trac.wordpress.org/ticket/21653#comment:12>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list