I was converting a timestamp here, when I red the following:

It should also be pointed out (thanks to the comments from visitors to this site) that this point in time technically does not change no matter where you are located on the globe. This is very useful to computer systems for tracking and sorting dated information in dynamic and distributed applications both online and client side.

I could not understand what this exactly means: is the unix timestamp an absolute measure?

That is: suppose I have a client in the USA and this client connects to a server located in Russia. Does the Unix timestamp is exactly the same in the same moment for both the client and the server? I'm a little confused...

  • 1
    Yes, the timestamp is a unique number that designates the same instant all over the globe. But you cannot give it a text representation (YYMMDD HH:MM:SS) without knowing the target timezone.
    – xenoid
    Dec 1 '17 at 21:18
  • @xenoid: ok, ok, now things are far more clear for me
    – 3000
    Dec 2 '17 at 8:13

On a correctly-configured machine, the unix timestamp is the number of seconds after Jan 1 1970 00:00:00 UTC. Thus, it would be the same regardless of what country or time zone the user or the computer is in.

  • 2
    More precisely than "correctly-configured", maybe: "on a machine that's time-synchronized to (now)"
    – Jeff Schaller
    Dec 1 '17 at 17:08
  • When I found that website, I was testing an iOS app (trying to figure out what caused a little bug). Anyway, a little search pointed me to (many) answers like this one stackoverflow.com/questions/6740546/…, where some users seem to suggest there was the need of an "adjust" to compare local and remote timestamps
    – 3000
    Dec 1 '17 at 17:22

Obviously the server clocks could be out of sync.

But the point is, the correct value for the timestamp at any given moment is identical regardless of location.

Your example isn't quite relevant because there would be some latency between Russia and the U.S., so even with accurate clocks you could get two different timestamps. But they wouldn't be hours apart. They would be (barring network problems) only in the range of seconds apart.

  • 1
    Of course, but thanks for pointing that out :-)
    – 3000
    Dec 1 '17 at 17:23

Timestamp 0 corresponds to a precise instant in time (not related to any timezone) also know as 1970-01-01 00:00:00 UTC (though UTC didn't exist at the time).

timestamp 1512148141 is 1512148141 seconds after that, with those seconds not atomic seconds but the average 86400th part of an Earth day.

Again, that's an instant in time that is in reference to a fixed instant in time, not related to any timezone.

That's 2017-12-01T17:09:01 UTC or 2017-12-01T11:09:01-06:00 in Chicago or 2017-12-01T22:09:01+05:00 in Karachi, all referring to the same instant.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.