Interesting Things
- fleegix.date.Date – Javascript, DST, and You
In 1895, George Vernon Hudson somehow managed to convince the world (of the Wellington Philosophical Society) that Daylight Savings Time was a good idea.[1] Hudson, an amateur entomologist, was motivated by his desire to look for bugs after work.[2] Sadly he did not forsee that determining DST for multiple regions using JavaScript would be a non-trivial task.
Javascript provides some rudimentary timezone support with Date.parse, but does not automatically apply daylight savings time, in other words:
Date.parse('Sep 9 2009 11:00:00 PST');
and
Date.parse('Sep 9 2009 11:00:00 PDT');
return different timestamps. fleegix.date.Date (a plugin for the fleegix.js library) lets you express the timezone as a region string, automatically taking into account whether or not that region observes Daylight Savings Time (by using Olson files), and providing the same interface as the native Javascript date. This means you can get an proper timestamp with the following:
new fleegix.date.Date('9/9/2009 11:00:00', 'America/Los_Angeles');
This is arguably more useful than Daylight Savings Time itself.
- RightScale errors
Two Pivots experienced an issue where RightScale was caching their connection to Amazon upon creation. This led to the connection start time parameter getting further and further out of date until Amazon failed to accept the upload with a ‘Request Time Too Skewed’ error. No workaround was discussed, but it was roundly decided that any error with the word “Skewed” in it is pretty awesome. [3]
[1] Well, according to Wikipedia, so it might as well have been Ron Paul for all we know.
[2] aaaaaand rimshot.
[3] Not really.
of course, daylight “saving” time was created by ben franklin as a way to make fun of Parisians.
December 8, 2009 at 11:28 am
Ron Paul is awesome.
December 13, 2009 at 11:06 am