Glad You're Ready. Let's Get Started!

Let us know how we can contact you.

Thank you!

We'll respond shortly.

Standup 12/8/2009

Interesting Things

  • – 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');


Date.parse('Sep 9 2009 11:00:00 PDT');

return different timestamps. (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'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.

  1. peter hessler says:

    of course, daylight “saving” time was created by ben franklin as a way to make fun of Parisians.

Post a Comment

Your Information (Name required. Email address will not be displayed with comment.)

* Copy This Password *

* Type Or Paste Password Here *