Reputation: 10297
For my needs, I care mainly about the continental U.S. (Pacific, Mountain, Central, and Eastern time zones), but a bonus would include the others, too.
What I wonder is if there is a known jQuery function that will return values that take into consideration daylight saving time when converting from one hour to anothertaking daylight saving time rules into account.
I reckon it would be called something like this:
var pertinentDatetime = getDateTimeFor(thisDateTime, thisTimeZone, desiredTimeZone);
Does anybody have or know of such a function?
Upvotes: 4
Views: 2716
Reputation: 34844
No, jQuery does not have built-in support for dealing time information like time zones.
Check out Moment.
The following should give what you want:
moment().zone();
Upvotes: 2