Logo Questions Linux Laravel Mysql Ubuntu Git Menu

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?

like image 643
bill_e Avatar asked Mar 16 '23 19:03


1 Answers

From man date:

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

So it is UTC.

like image 170
fedorqui 'SO stop harming' Avatar answered Mar 24 '23 18:03

fedorqui 'SO stop harming'