
How 1927-12-31 23:54:08 happened twice - martin_
http://stackoverflow.com/questions/6841333/why-is-subtracting-these-two-times-in-1927-giving-a-strange-result
======
dreen
This reminds me, if you're near a *nix termial, go and type:

    
    
        cal 9 1752
    

(dont worry `cal` just shows you a calendar).

You can also use this to troll developers that are doing anything that has a
calendar.

~~~
obituary_latte
Heh, interesting. Thanks for the nugget!

>The Gregorian reformation was adopted by the Kingdom of Great Britain,
including its possessions in North America (later to become eastern USA), in
September 1752. As a result the September 1752 cal shows the adjusted days
missing. This month was the official (British) adoption of the Gregorian
calendar from the previously used Julian calendar. This has been documented in
the man pages for Sun Solaris as follows. "An unusual calendar is printed for
September 1752. That is the month when 11 days were skipped to make up for
lack of leap year adjustments." The Plan 9 from Bell Labs manual states: "Try
cal sep 1752." [0]

[0]
[http://en.wikipedia.org/w/index.php?title=Cal_(Unix)#Feature...](http://en.wikipedia.org/w/index.php?title=Cal_\(Unix\)#Features)

~~~
mirkules
Some Orthodox Christians still use the Julian calendar, if only symbolically,
so Christmas falls on January 7th and New Years on January 14th (Easter is a
much different story:
[http://christianity.about.com/od/faqhelpdesk/qt/whyeastercha...](http://christianity.about.com/od/faqhelpdesk/qt/whyeasterchange.htm)).
In theory, these dates should move farther and farther apart than just two
weeks from the Gregorian calendar because the Julian calendar doesn't count
leap years the same way.

For us Julian calendar folks, there's upsides and downsides. We get to
celebrate Christmas late, but my kid will celebrate both (since my wife is of
a different religion). And of course, Easter falls on Cinco de Mayo this year
(but we had remember to buy enough egg coloring well in advance)! :)

------
ubernostrum
Wow, what a coincidence that someone curiously hit _precisely_ the timestamp
of this, _and_ knew to use a site where question and answer would be rewarded
with attention and votes.

(I am coming around to a suspicion that a lot of "wow, that's cool"-type SO
questions/answers are more or less fabricated to show off something the person
knows, rather than genuine knowledge-seeking, in case you can't tell)

~~~
mdmarra
Jon Skeet (the person that answered the question) works for Google, has more
than one blog, and rep caps on stackoverflow daily from old answers because
he's answered so many questions there. He's written multiple books on Java and
C#. He's plenty visible. Not to mention that the question is over two years
old.

There's no conspiracy here.

~~~
threegorges
Plus, if you look at the guy who asked the question, he's a programmer from
China, so it's not hard to imagine that had something to do with the fact that
these dates popped up in development.

------
pdw
This is really not a corner case. Think about it. Every place with daylight
saving time will experience a duplicate hour when switching from summer time
to winter time. A timestamp given in local time can map to multiple UTC times.

~~~
raldi
Except you can remove the ambiguity by stating either PDT or PST. You don't
have that option in 1927 Shanghai.

~~~
mortehu
Note that strftime does not produce unambiguous time zone names. The four-
letter Australian time zones are printed with names such as EST and CST.
Better use -0500, +0545 and the likes, as suggested by ISO 8601.

~~~
jonskeet
If you want to indicate a _time zone_ you shouldn't just use the offsets -
they're ambiguous in that several different time zones can have the same
offset at any point in time.

Better (IMO) to use the zoneinfo ID, e.g. "Europe/London" - along with the
offset as well, in case the local time is ambiguous in that time zone due to a
daylight saving transition.

------
lifeformed
Would a better system for our society be to just have a universal time? Like,
what if everyone in the whole world just set their clocks to UTC+0:00, and
never ever changed it. They would just plan everything relative to that. I
might work from 9-5 in one place, but in another someone would work from
3pm-11pm (still during daylight hours). That is to say, why do we try to
synchronize our numbers with the sunlight? Is it that important that every
culture gets to say that 12pm is midday?

It does seem weird that it may be customary to eat lunch at 12pm in one place,
but have it normal to eat lunch at 4:30am in another. But is it any weirder
than having arbitrary discrete jumps in time based on geography and time-of-
year?

~~~
ars
No, that would not be a better system.

You are just pushing the complexity somewhere else. It might make computer
programming a bit easier, but everything else would be harder.

And people still sleep at night, so you would still need to know when they are
awake, when they work.

~~~
lifeformed
It wouldn't be easier just for computing. If I need to coordinate stuff with
someone in a different time zone, it'd be much easier to be able to just say
"Let's have a call at 4pm," instead of figuring out what his timezone is. I
guess you'd still have to know if 4pm is a good time for him though. So he'd
have to have some sort of indicator of what the waking/working hours are in
his region... some sort of time zone. Nevermind, the more I think about it the
more I realize that timezones are pretty reasonable.

~~~
ars
LOL, I was about to reply exactly that, then you answered your own question.

------
bxbb
for a longer, funnier, and mind-blowing explanation from Jon Skeet about time:
[http://msmvps.com/blogs/jon_skeet/archive/2009/11/02/omg-
pon...](http://msmvps.com/blogs/jon_skeet/archive/2009/11/02/omg-ponies-aka-
humanity-epic-fail.aspx)

------
ck2
Are there any timezones left in the world that do not use whole hours?

~~~
Gurrewe
Yes, there is. <http://en.wikipedia.org/wiki/Time_zone#List_of_UTC_offsets>

~~~
tellarin
Interestly quite a few use 30min and three use 45min, but none uses 15min.

I wonder why...

~~~
lostlogin
Might be revealing a profound misunderstanding, but isn't that just because of
the reference point? If UTC+0 were the The Chatham Islands, then a few would.

~~~
Dylan16807
And then there would be a gap at 45. The point is that only three of the four
quadrants are occupied.

~~~
lostlogin
Yeah that isn't covered by what I said. I wonder if it relates to convenience.
Having the same time as your neighbour is probably more handy than having a
day that is off by 15 in my opinion, even off by 30 wouldn't bother me much.
There must be countries that have muddled through this scenario. But it still
leaves a question as to why only certain time points are chosen and others
avoided.

------
m4tthumphrey
Just one of Skeets masterpieces!

~~~
EnderMB
The second I read the title and noticed it was a Stack Overflow question, I
knew that there would be an answer from Jon Skeet.

I'm not usually prone to hero worship, but I've got a lot of time for him. His
book C# in Depth is absolutely fantastic, he's helped me (and probably many
others on here) with questions on SO, and he comes across as such a nice guy.

~~~
junto
There is a really great Scott Hanselman podcast where he invited Jon Skeet on
to chat at CodeMash. Fascinating insight into how the guy ticks:
[http://www.hanselminutes.com/302/being-a-phony-with-jon-
skee...](http://www.hanselminutes.com/302/being-a-phony-with-jon-skeet)

~~~
jonskeet
I only tick in .NET.

In Java I millisecond instead.

~~~
martin_
Haha! Good to see you here Jon! I went to reading festival last year, was
hoping I'd bump into you actually... Nevermind ;)

~~~
junto
Wooah. I used to live in Reading. Small world.

------
mmariani
<http://www.panic.com/blog/2009/12/on-calendars/>

Another interesting post about the weirdness of calendars.

------
Mahn
Odd, I would think most HNers have already heard of the top voted Jon Skeet
answer. This is really old. Discussion is always great though, can't question
that.

