Search code examples
dateunixtimestamputc

Is date +%s result in local time zone or in UTC?


When I type date +%s into a terminal, is the resulting timestamp given in UTC or is it dependent on my system locale setting? Is there a way to check?

Is there a standard for this across OS's?


Solution

  • From man date:

    %s seconds since 1970-01-01 00:00:00 UTC

    So it is UTC.