Reputation: 603
I have a timestamp string with me (1606031551). There are n number of functions to convert a timestamp into UTC in php. But I could not find a method that checks whether the timestamp string is UTC in php. Can you please tell if there are any methods which determine whether the current timestamp string is UTC?
Upvotes: 0
Views: 53
Reputation: 176
Timestamps are simple integer that counts every second from Thursday, 1 January 1970. Unix timestamps are in UTC timezone. You cannot extract timezone from a simple integer number without any other information.
Upvotes: 3
Reputation: 166
Timestamp should always be in UTC because it's pure int and you cannot pass timezone with it.
Upvotes: -1