News for hackers. Stuff that matters.
Re:Falsehoods programmers believe about Unix time by throw0101a on Wednesday May 15, 2019 @03:36PM (#19922936)
Some people think one year is one orbit around the sun, and not exactly 365 days. Leap years help to keep that reality.

Some people think that a day is one revolution of Earth's axis, and not exactly 86400 seconds. Leap seconds help to keep that reality.

The fact that axial rotation is less predictable than orbital paths is a quirk of nature.

Re:Falsehoods programmers believe about Unix time by KayEss on Thursday May 16, 2019 @02:09AM (#19926569)
> Some people think that a day is one revolution of Earth's axis, and not exactly 86400 seconds

One day is more than one revolution of the planet. The sidereal day is exactly one rotation of the planet, but that's about four minutes shorter than a civil day.

The reason is that the planet also moves around the sun, so in order to get the sun to the same position in the sky for noon the planet needs to turn a little bit more than 360 degrees, about 360/365 extra.

Re:Falsehoods programmers believe about Unix time by xmprt on Wednesday May 15, 2019 @04:32PM (#19923456)
Leap years have pretty straightforward rules for when they happens. Approximately every 4 years, expect on 100 years, except on 400 years. Leap seconds on the other hand happen at the whim of the IERS
Re:Falsehoods programmers believe about Unix time by scythe on Wednesday May 15, 2019 @09:57PM (#19925514)
Leap years are actually just slightly inaccurate. Leap years estimate an orbital period of 364.2425 days but the actual orbital period is 365.24217 days.

Also, it should be noted that basically nobody actually understands a "year" to mean an orbit of Earth around the Sun relative to the Local Standard of Rest, which is called a sidereal year (ca. 365.256 days). Instead, to most people, a year means a cycle of seasons which recreates the same angle between the Earth-Sun axis and the Earth's axial tilt, which generates seasonal temperatures and is called a tropical year. Because the axial tilt is variable, the tropical year also varies and eventually drifts away from the sidereal year. The tropical year and sidereal year differ by about 20 minutes, so today's year starts about a month "away" from the year Julius Caesar enacted the first true solar calendar.

The difficulty in this case is that spinning rocks in space can float around however they please.

Re:Falsehoods programmers believe about Unix time by insulanus on Thursday May 16, 2019 @02:10PM (#19931327)
A nice hack for a time system for Earth might be to add the leap seconds on the last day of leap years.

That would keep the time and date adjustment code together in one place.

Re:Falsehoods programmers believe about Unix time by dwild on Thursday May 16, 2019 @10:25AM (#19929325)
You chose your units arbitrarily to fit your argument.

Here's my version of it:

Some people think one year is one orbit around the sun, and not exactly 365 days. Leap years help to keep that reality.

Some people think that a day is one revolution of Earth's axis, and not exactly 1440 minutes. Leap minutes help to keep that reality.

And now we are at less than one change every century!