News for hackers. Stuff that matters.
Re:Hate leap seconds? Imagine a negative one by civilized on Thursday January 13, 2022 @02:34PM (#29925604)
Now we're going to have "lies programmers believe about time":

1. Seconds in one time system last the same amount of time as seconds in another time system

2. Seconds in the same time system last the same amount of time as each other

3. Time numbers are strictly increasing - the same time number can't happen again

4. [etc, kill me]

Re:Hate leap seconds? Imagine a negative one by karmakurtisaani on Thursday January 13, 2022 @02:37PM (#29925656)
Just wait until we reach the proper space age and start traveling at speeds close to the speed of light. Taking into account the relativistic effects is going make more than a few coders switch carees to organic farming.
Re:Hate leap seconds? Imagine a negative one by nradov on Thursday January 13, 2022 @02:42PM (#29925729)
GPS satellite designers already have to account for clock skew due to relativistic effects. A nice little real world confirmation of the theory.
Re:Hate leap seconds? Imagine a negative one by monocasa on Thursday January 13, 2022 @02:50PM (#29925848)
Luckily clock skew already happens and is handled more or less by the current systems. The difference between the system moving at relativistic speeds versus a crystal being slightly out of spec add up to the same result. Incorrect number of ticks for a given proper time interval.

That's part of the genius of Leslie Lamport, embracing the fact that your distributed clocks aren't consistent, so start looking at effects through distributed systems from a light cone perspective just like you do with relativity.

Re:Hate leap seconds? Imagine a negative one by willis936 on Thursday January 13, 2022 @03:13PM (#29926155)
Clock skew is in error. Relativistic time dilation is not. Both clocks will be right and disagree. You can't escape answering the question: do I care about the time elapsed at home or the time elapsed here?
Re:Hate leap seconds? Imagine a negative one by monocasa on Thursday January 13, 2022 @05:59PM (#29928220)
At the end of the day there's always skew; crystals in systems aren't made to perfect tolerances. In fact I'm not even sure how you would define perfect tolerances for clocks in a meaningful way.

So at the end of the day it doesn't matter if it's in 'error' or a fundamental to the physics even under perfect conditions. Neither are really under your control and both have the same answer.

> You can't escape answering the question: do I care about the time elapsed at home or the time elapsed here?

We already have that concept, in the difference between CLOCK_WALL and CLOCK_MONOTONIC. You use monotonic for "local temporal reference frame" and wall for "proxy of globally visible temporal reference frame". Wall shifts around anyway as NTP or what have you figures out how skewed off of "actual" time you are.

Re:Hate leap seconds? Imagine a negative one by dasil003 on Thursday January 13, 2022 @05:24PM (#29927801)
If you need time elapsed then you implicitly need a frame of reference in the same way that a clock time needs a time zone to be meaningful in a global basis. In practice if you wanted this it would mean having a timer colocated within your frame of reference as there is no scalar representation of a frame of reference that would allow you to do timestamp calculations. Timestamp math only works as a hack because we mostly stay relativistically close to Greenwich.
Re:Hate leap seconds? Imagine a negative one by fanf2 on Thursday January 13, 2022 @05:59PM (#29928230)
Astronomers use mathematical models of the solar system to translate between barycentric time, geocentric time, and terrestrial time, which are all different relativistic frames of reference. Only TT has actual clocks: TAI ticks at the same rate as TT, tho for historical reasons there is a fixed offset. That isn’t counting the clocks derided from observing the orbits of the moons and planets…
Re:Hate leap seconds? Imagine a negative one by Dylan16807 on Thursday January 13, 2022 @09:41PM (#29930002)
> You can't escape answering the question

Yes you can. When error swamps the difference between two things, you don't have to choose.

Do you set your analog alarm clock to wake you at 6:00:00 or 6:00:05?

Re:Hate leap seconds? Imagine a negative one by willis936 on Friday January 14, 2022 @08:01AM (#29933915)
Is that not choosing?
Re:Hate leap seconds? Imagine a negative one by Dylan16807 on Friday January 14, 2022 @08:17PM (#29942645)
The answer I was implying is: You can't distinguish between them, you put the arm in the vague vicinity of both. So no it's not choosing. You could choose which to aim at if you really wanted to, but the end result would be basically the same. You can't choose which one it's set to, because it's so far below the noise floor.
Re:Hate leap seconds? Imagine a negative one by willis936 on Friday January 14, 2022 @11:44PM (#29943625)
Today it is. My point is if a ship goes on an 80 year journey at an appreciable speed then its wall clock will disagree by an appreciable amount. If we have hundreds or thousands of such ships and they communicate with each other, someone will need to choose what clock they care about and it won't be the Earth's clock.
Re:Hate leap seconds? Imagine a negative one by Dylan16807 on Saturday January 15, 2022 @02:23AM (#29944436)
Well I meant the real you/me. Not a hypothetical spaceman.

Anyone on Earth can just say their computer clocks are set to "Earth", ignore relativity, and use their normal clock skew correction algorithms.

It's not "You can't escape answering the question". It's "Interplanetary spacemen can't escape answering the question." And those spacemen might not even use seconds.

Re:Hate leap seconds? Imagine a negative one by kuschku on Thursday January 13, 2022 @03:24PM (#29926328)
We already define time relative to 1970-01-01, relative to the mean solar noon in Greenwich.

We should also define the length of a second to mean "at sea level in Greenwich".

Re:Hate leap seconds? Imagine a negative one by tialaramex on Thursday January 13, 2022 @04:17PM (#29926994)
This just means the "length of a second" wanders around randomly and is thus useless. So now "a second" isn't any particular amount of time, and you've lost all ability to really measure time except in a vague inexact sense.

The quest to eliminate irreproducibility from metrication is why SI did all that work to finally eliminate the kilogram prototype. The second was defined reproducibly decades ago because trying to define it based on our planet's inconstant spin was such a failure.

The fact that the Earth's spin is not constant is perhaps frustrating, but like other facts just insisting it isn't true doesn't help you.

Re:Hate leap seconds? Imagine a negative one by fanf2 on Thursday January 13, 2022 @05:06PM (#29927579)
Right, but general relativity matters for how astronomers define their timescales, and how they are measured and maintained in practice: there are different scales for barycentric time (at the centre of gravity of the solar system), geocentric time (centre of the earth) and terrestrial time (on the surface of the rotating geoid). TAI is supposed to tick at the same rate as TT, so it depends on a model of an equal-gravitation version of sea level (the geoid) and the relative height of the time labs. In particular, NIST is a mile high in Colorado so their clocks tick a lot faster than (say) NPL by the Thames in west London.
Re:Hate leap seconds? Imagine a negative one by tialaramex on Thursday January 13, 2022 @07:11PM (#29928856)
Sure, the quest for Universal Time is despite the name necessarily a local quest so you can't meaningfully export your results to creatures orbiting a distant quasar as you can with the SI units.

But the size of the discrepancy between Colorado and London is far smaller than the discrepancy Leap Seconds are concerned with right?

Re:Hate leap seconds? Imagine a negative one by fanf2 on Thursday January 13, 2022 @07:23PM (#29928951)
Yeah, gravitational time dilation is about 1e-16 seconds per metre of elevation near the surface http://leapsecond.com/great2016a/index.htm so Boulder is about 1e-13 fast. The rotation of the earth is stable to about 1e-9 http://leapsecond.com/ten/ which is also about the same as the rate difference between UT1 and UTC (0.2 ms / 86400).
Re:Hate leap seconds? Imagine a negative one by sla29970 on Monday January 17, 2022 @01:31AM (#29963920)
During the discussions leading to the inception of the SI second the bigwig standards folks nixed the consideration of relativity, basically paraphrased as "If you physicists do not stop arguing about relativity we will never redefine time in a way that removes it from the astronomers."
Re:Hate leap seconds? Imagine a negative one by kuschku on Saturday January 15, 2022 @09:26AM (#29946578)
> This just means the "length of a second" wanders around randomly and is thus useless

Why would it? My redefinition just means the length of a second is defined as a given number of cycles of caesium in a gravitational field equivalent to that of Greenwich.

If you're in a different gravitational field, you'll just have to convert the values easily.

Re:Hate leap seconds? Imagine a negative one by CamperBob2 on Thursday January 13, 2022 @10:18PM (#29930222)
These days, the length of a second is defined by the difference in frequency between two ground-state energy levels of a caesium-133 atom, which works out to 9192631770 cycles per second. No need to check tide tables.
Re:Hate leap seconds? Imagine a negative one by kuschku on Saturday January 15, 2022 @09:24AM (#29946563)
That definition is still relative. It still requires as additional factor the place where the measurement is taken, due to Einstein's theories.

That's why I proposed changing the second definition to 9192631770 cycles in a gravitational field equivalent to that of Greenwich.

Re:Hate leap seconds? Imagine a negative one by kempbellt on Thursday January 13, 2022 @04:59PM (#29927496)
Sea level when the tide is in, or out?
Re:Hate leap seconds? Imagine a negative one by fanf2 on Thursday January 13, 2022 @05:07PM (#29927588)
“sea level” is short for “mean sea level”
Re:Hate leap seconds? Imagine a negative one by el_isma on Thursday January 13, 2022 @06:23PM (#29928452)
Not trying to troll, but... What happens if/when global warming makes sea level rise? Do we have measurements that are still based on "sea level"?
Re:Hate leap seconds? Imagine a negative one by _whiteCaps_ on Thursday January 13, 2022 @07:26PM (#29928978)
https://tidesandcurrents.noaa.gov/sltrends/faq.html

> Tidal datums must be updated at least every 20-25 years due to global sea level rise. Some stations are more frequently updated due to high relative sea level trends.

Re:Hate leap seconds? Imagine a negative one by kempbellt on Tuesday January 18, 2022 @08:31PM (#29988720)
I mean, I feel like that's fairly obvious, and the playful pedantry of my comment in a discussion on the very definition of basic unit of measurement was overlooked.

If we are going so far as to rigidly include "sea level" in the definition of "a second", it would probably help if we say that that we mean mean sea level.

Know what I mean?

Re:Hate leap seconds? Imagine a negative one by ISL on Thursday January 13, 2022 @03:23PM (#29926309)
Those corrections (both special and general relativistic, with opposite signs) are already required to allow GPS to function.
Re:Hate leap seconds? Imagine a negative one by gorjusborg on Thursday January 13, 2022 @03:17PM (#29926211)
I'd like to think my descendants will be beet farmers in a far away solar system.
Re:Hate leap seconds? Imagine a negative one by eftychis on Thursday January 13, 2022 @03:28PM (#29926396)
We do: all these are taken into account for satellites. In particular GPS is one of the prime examples as it is affected by both special and general relativity and how fast time elapses is critical to its function.
Re:Hate leap seconds? Imagine a negative one by Swenrekcah on Thursday January 13, 2022 @03:56PM (#29926726)
Probably takes some serious skills to be an organic farmer on Ceres.
Re:Hate leap seconds? Imagine a negative one by bee_rider on Thursday January 13, 2022 @04:08PM (#29926886)
Conveniently it turns out that the results are the same independent of your skill.
Re:Hate leap seconds? Imagine a negative one by labster on Thursday January 13, 2022 @07:00PM (#29928774)
It does, but you make more money than you would using standard farming methods and pesticides on Ceres.
Re:Hate leap seconds? Imagine a negative one by npongratz on Thursday January 13, 2022 @04:01PM (#29926787)
Re:Hate leap seconds? Imagine a negative one by nwallin on Thursday January 13, 2022 @11:54PM (#29930715)
A collection of several falsehoods programmers believe lists, not just time:

https://github.com/kdeldycke/awesome-falsehood

Re:Hate leap seconds? Imagine a negative one by 2muchcoffeeman on Thursday January 13, 2022 @05:28PM (#29927836)
Why wouldn’t we decouple time from the earths orbit?

Instead have 2 calendars: the normal date time is standardised, no leap anything and simply increases. The orbital time tracks the earths revolution around the sun.

Sure, eventually the two will drift. But leap days account for 3 weeks-ish of time for the average person through out their life (let’s assume 80 years life span for arguments sake). So this doesn’t seem so hard to adjust to.

Re:Hate leap seconds? Imagine a negative one by dredmorbius on Thursday January 13, 2022 @07:46PM (#29929141)
Earth clock time and calendars arose specifically to measure time as concerns earth-related experiences --- events within a day, throughout the year, and across multiple years.

Measurement systems ultimately serve the needs of those who are doing the measuring. This fact alone accounts for many of the idiosyncratic aspects of traditional measurement systems. An acre-foot measurement (a volume of water) makes sense when you've got a pond whose surface area (in acres) is known, and whose depth (in feet) can be measured against a post or dam face. An acre itself is the amount of land a farmer can plough in a day (in German, Tagwerke), and would vary by terrain, farmer, plough, draught animals, and hitches.

Time systems suitable for other needs may come to be used. So long as a substantial human population remains on Earth, an Earth-centric time system will all but certainly exist, and adapt to changes in the Earth-Moon-Sun system's orbital and rvolutionary characteristics.

Re:Hate leap seconds? Imagine a negative one by SkittyDog on Thursday January 13, 2022 @07:28PM (#29928996)
When I first read this, my intial reaction was "LOL what a silly... of course the simple reason is..." ... and then it turns out, I couldn't actually explain it to myself. I had a couple of reasons lined up, but none of them passed muster when I broke it down.

I suspect the real reason my be overlapping domains of varying precision/accuracy, which tolerate different degrees of error on any specific time measurement, but still need to agree on a shared center of the distribution of that error.

So in our daily lives, we might tolerate a fraction of a second of drift without notice... But there are some specialty domains that do require more precision, and we need the time measurements in both domains to mostly line up, to avoid confusion. So our daily clock needs to be slaved to the more precise clock, even if we don't require that precision in most things.

Re:Hate leap seconds? Imagine a negative one by 2muchcoffeeman on Thursday January 13, 2022 @08:44PM (#29929616)
It's not obvious to me that there would be a loss of precision. If you are a farmer, you check the solar calendar and plan activities based on that. For your daily work, you still have the normal 24hour day.

But we do all sort of dumb time related things: - day light savings - leap seconds, days, years

Some places too close to the poles don't have normal day/night cycles of light. So we already tolerate a lot of weird time stuff. This way we keep tolerating it and get rid of the calculations.

Re:Hate leap seconds? Imagine a negative one by SkittyDog on Friday January 14, 2022 @02:22AM (#29931520)
Wait... Why is all that timekeeping stuff "dumb"? Because you don't see a reason for it, and you can't imagine that you might not yet know the reason why? That's just plain egotistical, man.

https://wiki.lesswrong.com/wiki/Chesterton%27s_Fence

You need to learn the actual reasons why precision synchronous time exists. Until you do that, you're just wandering around in the dark, being silly.

Re:Hate leap seconds? Imagine a negative one by lmm on Friday January 14, 2022 @01:58AM (#29931382)
Look at how bad people are at dealing with timezones. Having two similar but subtly different overloadings of the same terms is a recipe for confusion (having very distinct terms would actually be an improvement).
Re:Hate leap seconds? Imagine a negative one by FredPret on Thursday January 13, 2022 @06:19PM (#29928408)
Leap seconds are so much simpler than trying to wrangle two calendars with built in drift
Re:Hate leap seconds? Imagine a negative one by 2muchcoffeeman on Thursday January 13, 2022 @08:33PM (#29929502)
I'm not sure how you figure that.

In my system, the time is simply a number that increments. No calculations are ever needed to correct anything. This is what most people use to schedule things.

The second "clock" tracks position of the earth around the sun. You need it for the seasons. But this too is always exact. There will never be a situation where we need to adjust it. You can never reach the end of a year and be slightly short on the distance traveled around the sun. So one day Xmas is slightly warming than usual. But so what?

Re:Hate leap seconds? Imagine a negative one by FredPret on Thursday January 13, 2022 @08:50PM (#29929661)
Every person using their calendar is solving one simple problem in a simple way.

But the real magic of the calendar is that billions of individuals use the same calendar for the same problem and thus we can all agree what day it is, every single day.

So if there's an issue with the existing calendar, then simply adjusting our calendar by an amount really no-one will notice is by far the most practical solution. Almost every industry cycles with the season; we need the calendar to track it accurately.

Re:Hate leap seconds? Imagine a negative one by 2muchcoffeeman on Friday January 14, 2022 @01:36AM (#29931259)
I have not broken any of that though.

The article is all about trying to get 2 things to sync because of the slowing down of the earths rotation. You haven't actually described why we need to go to this effort beyond maintaining the current system. Nor why this is a practical thing to do in general beyond maintaining the current system.

Loads of people accept weird times shifts all the time. The poles have 6 month days and nights. In the summer I get 3 extra hours of day light and treat 7pm as "day". We already adjust what we do by what it looks like outside. Why does the time need to "match"?

Re:Hate leap seconds? Imagine a negative one by FredPret on Friday January 14, 2022 @11:45AM (#29936795)
Everything hinges on our rotation around the sun - at the most fundamental level: seasons, crops, construction schedules, even military campaigns. From there on up we get holidays, sport seasons, business cycles. These things have to match up to the calendar from one year to the next or there will be chaos.

If our calendar is off by a second or two a year, it's very easy to correct without confusing the general populace - most people want to spend precisely zero time thinking about calendars and orbits. Currently, only a few nerds have to worry about leap seconds and the like. And it's part of their jobs, so it's OK.

In a two-calendar system, every human will have to keep track of a personal calendar and a scientific calendar. Asking people who don't care to do that - and to fix an issue we already have an almost zero-friction fix for - is a non-starter.

Re:Hate leap seconds? Imagine a negative one by withinboredom on Friday January 14, 2022 @05:53AM (#29932923)
With your calendar, wouldn't the drift eventually be so bad that the month we currently call January might be your calendar's October? When people read old stories about the fall leaves of Halloween people would think it was weird because there'd normally be snow on the ground in October, or the dead heat of summer in the southern hemisphere. And what's this about a "white Christmas?" in Spring?

Keeping the time in sync with the orbit of the earth isn't just about the "here and now" but also history.

Re:Hate leap seconds? Imagine a negative one by wglb on Thursday January 13, 2022 @09:19PM (#29929863)
Here is one of many. Several are also shown in this thread: https://gist.github.com/timvisee/fcda9bbdff88d45cc9061606b4b...
Re:Hate leap seconds? Imagine a negative one by vba616 on Friday January 14, 2022 @12:57AM (#29931079)
I took leap seconds for granted, then I read about Google "smearing" leap seconds. And then (on HN) I read about someone else working on a standard for smearing them differently than Google does, just because.

...aaaand there's an xkcd:

https://xkcd.com/2266/