[buddypress-trac] [BuddyPress Trac] #5781: strtotime() is evil don't use it

buddypress-trac noreply at wordpress.org
Wed Jan 11 18:21:14 UTC 2017

#5781: strtotime() is evil don't use it
 Reporter:  r-a-y         |       Owner:  r-a-y
     Type:  defect (bug)  |      Status:  closed
 Priority:  normal        |   Milestone:  2.7
Component:  Core          |     Version:
 Severity:  normal        |  Resolution:  fixed
 Keywords:  has-patch     |

Comment (by boonebgorges):

 For future reference: On a client site, I found an instance of a direct
 SQL query attempting to get recently active users like this:

 SELECT ... FROM {$bp->members->table_name_last_activity} ... WHERE
 date_recorded >= DATE_SUB( UTC_TIMESTAMP(), INTERVAL 1 HOUR ) ...

 The changes in this ticket mean that I needed to switch `UTC_TIMESTAMP()`
 to `NOW()` in order for recently-active users to be picked up. This seems
 backward to me: my understanding was that the goal here was to move away
 from timezone dependence. I haven't taken the time to dig any deeper into
 what's happening, but I thought I'd leave a note here.

Ticket URL: <https://buddypress.trac.wordpress.org/ticket/5781#comment:22>
BuddyPress Trac <http://buddypress.org/>
BuddyPress Trac

More information about the buddypress-trac mailing list