Make WordPress Core

Changes between Initial Version and Version 1 of Ticket #21653, comment 11


Ignore:
Timestamp:
01/12/2016 11:53:21 AM (9 years ago)
Author:
Turn On Social
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #21653, comment 11

    initial v1  
    11'timestamp' functionality appears to be wrong.
    22
    3 current_time('timestamp') should always return the timestamp according to GMT. That's because a timestamp is defined as the number of seconds that have elapsed since 00:00:00 Coordinated Universal Time (UTC), Thursday, 1 January 1970.
     3current_time('timestamp') should always return the timestamp according to UTC. That's because a timestamp is defined as the number of seconds that have elapsed since 00:00:00 Coordinated Universal Time (UTC), Thursday, 1 January 1970.
    44
    55Therefore, producing this offset by x number of hours for local time is incorrect logic. If it's 1,452,598,896 seconds since the start of Unix time, this does not change depending on timezone - the number of seconds is the same (but may instead be displayed differently depending on timezone).