Question

So I have a strange problem, I have a java swing application that has the date 10/11/1922 00:00:00 MST but when it sends that date to my backend glassfish server via RMI the date becomes 10/10/1922 23:00:00 MST. So it is somehow losing an hour, is this a bug? I can't find anything on google that references this problem. If I do a date in 1923 it works fine I don't lose an hour. My client is running 1.6.0 patch 30 and my server is running 1.6.0 patch 17.

Was it helpful?

Solution

I think I've seen a question like this before--essentially there was a shift in the definition of timezones at that point in history, or something like that, so that hour actually never existed. I think, in fact, Jon Skeet was the one to locate the error (in the previous SO question). I can't find it right now, I have to go to lunch, but I think it's out there :D

OTHER TIPS

I have seen a similar question here: Why is subtracting these two times (in 1927) giving a strange result? this showed the error arose due to time zone changes. Doing a quick Google I found for example in the UK in 1922 the times were forwarded by an 1h to compensate for daylight time savings see here: http://www.timeanddate.com/worldclock/clockchange.html?n=136&year=1922. I stand corrected though.

EDIT:

I think I found the exact change you talked about, as yours is actually set back by an hour and not forwarded like I said in my original post: http://www.timeanddate.com/worldclock/clockchange.html?n=286&year=1922

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top