Utc timestamp

Hello,

I just want to make sure that the following bit of code: gmdate(“Y-m-d\TH:i:s\Z”); is at no point and under no circumstance platform related, localized etc. That no matter where you run ti, you get a utc UNIX timestamp.

:slight_smile:

bump :slight_smile:

Well, it is bit-limited in that it can only do dates up until 2038 (The End of the 32-bit Date Scheme, aka the “Year 2038 Problem”). This problem will likely not actually affect many systems by the time it comes around (as presumably virtually all systems will have advanced to using a 64-bit time key by then).

As this function still is reliant upon the system local time, it is vulnerable to an off system clock; if the time UTC is 12:00:00 but your system thinks its 08:04:00 -0400, then it will spit out a date of 2012-07-23T12:04:00Z.