Skip to content
This repository has been archived by the owner on Jan 26, 2020. It is now read-only.

Commit

Permalink
Unit test for static DST offsets, instead of rule references, in Zone…
Browse files Browse the repository at this point in the history
… definitions. For example, '1:00'.
  • Loading branch information
divide0 committed Feb 8, 2013
1 parent 8c4260e commit a0d0d8b
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions spec/date.spec.js
Expand Up @@ -315,4 +315,10 @@ describe('timezoneJS.Date', function () {
date.setHours(0, 1, 2, 3);
expect(date.getMilliseconds()).toEqual(3);
});

it("Handles static dst offsets in Zones like '1:00' instead of DST rule references.", function(){
var date = new timezoneJS.Date(Date.UTC(2012, 2, 1, 0, 0, 0, 0), "Pacific/Apia");
expect(date.getTimezoneOffset()).toBe(-840);
expect(date.toString("yyyy-MM-dd HH:mm:ss Z")).toBe("2012-03-01 14:00:00 WSDT");
});
});

0 comments on commit a0d0d8b

Please sign in to comment.