[wp-trac] [WordPress Trac] #48976: Current_time
WordPress Trac
noreply at wordpress.org
Mon Dec 16 11:45:37 UTC 2019
#48976: Current_time
-------------------------------+------------------------------
Reporter: autotutorial | Owner: (none)
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Date/Time | Version: 5.3
Severity: normal | Resolution:
Keywords: reporter-feedback | Focuses:
-------------------------------+------------------------------
Comment (by autotutorial):
I certainly elaborate my report, I admire WordPress and often I copy the
code for my personal projects, I observed the wp_timezone function returns
a text string or a string hh: mm but keep in mind that the hour is a float
and not int as it does current_time but especially for the timestamp does
not take into account the timezone string, if the timezone string is
present the quasi numerical offset has a value of 0.
With php 7.3 I get an error if the DateTimeZone is not an object but a
string.
Time never stands still, in reality if you work with time zones that are
not directly created by php, it is useful to check the DateTimeZone string
with the WordPress string, differently when working dynamically with the
php database timezone table ( there should not be a timezone conversion)
also previous versions use daylight saving time incorrectly, it would be
nice to add this also in WordPress.
Another aspect is if I use php with local settings or the variable tz who
knows how DateTime works? : D
--
Ticket URL: <https://core.trac.wordpress.org/ticket/48976#comment:3>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list