I have a Unix timestamp that comes from a database that (unfortunately) is in the time zone with a specific amount of +3600 or +7200, depending on whether it is DST or not. This has never been a problem before, but our website is currently moving to a more international audience and due to interaction with Javascript with the specified timestamps, I need to convert the timestamp without any bias.
So, how do I, given only the Unix timestamp, get the offset for the time zone at the time of this timestamp? I am looking at PHP docs, but there are so many date / time functions that I lost a bit.
I am using PHP 5.2.3
source
share