[buddypress-trac] [BuddyPress Trac] #5781: strtotime() is evil don't use it
buddypress-trac
noreply at wordpress.org
Wed Jul 30 19:02:26 UTC 2014
#5781: strtotime() is evil don't use it
--------------------------+------------------
Reporter: r-a-y | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: 2.1
Component: Core | Version:
Severity: normal | Resolution:
Keywords: has-patch |
--------------------------+------------------
Comment (by r-a-y):
WordPress uses localized times for the most part and are not as reliant on
UTC as we are.
However, they do make one change in `strtotime()` when using the post's
GMT date:
https://core.trac.wordpress.org/browser/tags/3.9.1/src/wp-admin/includes
/meta-boxes.php#L170
https://core.trac.wordpress.org/browser/tags/3.9.1/src/wp-
includes/functions.php#L30
https://core.trac.wordpress.org/browser/tags/3.9.1/src/wp-
includes/post.php#L3379
They either use the timezone difference "+0000" or the GMT timezone so the
time is set to GMT. Perhaps that's something we should think about doing
ourselves? Could use some feedback here.
For now, I'll remove the `bp_core_strtotime()` references, but the other
changes from my patch should be good (removal of `strtotime()` in various
spots, using `bp_core_current_time( true, 'timestamp' )` where necessary).
--
Ticket URL: <https://buddypress.trac.wordpress.org/ticket/5781#comment:4>
BuddyPress Trac <http://buddypress.org/>
BuddyPress Trac
More information about the buddypress-trac
mailing list