Does UNIX time record Timezone? Does UNIX time record Timezone? unix unix

Does UNIX time record Timezone?


"0" in UNIX time was 1st January 1970 in UTC time. Every UNIX time is the seconds from that date, time, and timezone.


'unix time' is the number of milliseconds from the epoch, which is standard for all of our planet Earth. the timezone is then used as a modifier to that time.


POSIX 7 defines it as (emphasis mine):

If the year is >=1970 and the value is non-negative, the value is related to a Coordinated Universal Time name according to the C-language expression, where tm_sec, tm_min, tm_hour, tm_yday, and tm_year are all integer types:

tm_sec + tm_min*60 + tm_hour*3600 + tm_yday*86400 +(tm_year-70)*31536000 + ((tm_year-69)/4)*86400 -((tm_year-1)/100)*86400 + ((tm_year+299)/400)*86400

So it is always relative to UTC, and thus does not encode timezone information.

Taught to me by: https://stackoverflow.com/a/20035913/895245