jTimezone
jTimezone
I made a jQuery plugin for automatically determining the correct timezone of the user based on his/her computer's system time.
The intent of the plugin is to free the user from having to select from a long list of timezones by automatically writing his/her timezone into a <input type='hidden'> field inside whatever form the end-user is filling out.
Usage is simple:
$('#my_hidden_input_field').jTimezone();
The timezone is stored as a string that looks like:
-08:00, 1
The 1 at the end means that that timezone respects daylight savings, and has a value of "0" otherwise.
So far I don't have a function that converts UTC times into local times, but if you guys have any ideas just give me a holler. (I'm particularly interested in the Ruby on Rails case, but I'd like to keep the plugin fairly general.)
http://github.com/thirdreplicator/jTimezone
Cheers,
David :)