-1

Conventional time is meant to stay in sync with the rotation of the earth, and so is shifted with leap years and leap seconds, while Unix time is meant to measure the number of seconds since midnight Jan 1 1970. As such, the two drift apart over time.

But what about the decimals? It seems to me that if you took just the decimal portion of UTC, Unix time, and frankly any other time zone, they should line up except during the exact time a leap second or leap smear is taking place.

Are the decimal components of Unix timestamps and UTC time synced (except during such events)?

Tal
  • 109
  • 2
  • 1
    When you say decimals, do you mean milliseconds? Nanoseconds? Picoseconds? A unix timestamp traditionally does not have these, and since the rotation of the earth is not constant.. depending on the amount of precision the numbers are usually going to be different from each other. – Evert Nov 07 '19 at 04:58
  • Unix time isn't adjusted to compensate for these factors, but conventional time _is_, though _I believe_ that it's only compensated in units of seconds or greater. Hence the question – Tal Nov 07 '19 at 05:10
  • 1
    Sorry, but this is not [on topic for Stack Overflow](https://stackoverflow.com/help/on-topic), as it does not relate to programming as asked. – Matt Johnson-Pint Nov 07 '19 at 05:51
  • Related: [Difference between UTC and GMT](https://stackoverflow.com/questions/48942916/difference-between-utc-and-gmt) – Ole V.V. Nov 07 '19 at 09:58

1 Answers1

0

The reason leap seconds are issued is because we have 2 different definitions of measuring a second:

These 2 seconds are not equal length. In science and computing we prefer something very exact, and for clocks we prefer the second to be 1⁄86400 of a day.

To make clocks on computers match up with our expectation of the rotation-based clock, we add or remove seconds in the form of leap seconds.

What's really going on is that the 'length' of these 2 second definitions is different and keeps changing (compared to each other). Once the length has caused 1 the clock to drift far enough we just add a second to our computers to match the other definition.

But this drift is not instant. It happens over time. This means that the both these clocks slowly drift apart.

The suggestion that the 'decimals' are the same doesn't really make that much sense then. The difference between these decimals grow and grow until we have to add or remove a second to make them closer together again. The Earth's rotation isn't suddenly an extra second faster one day.

So when you ask the question: are they synced? It's asking whether the rotation of the earth is synced. We don't yet have the power to make the earth spin slower or faster ;)

Evert
  • 93,428
  • 18
  • 118
  • 189