Permalink
Browse files

Unit test for static DST offsets, instead of rule references, in Zone…

… definitions. For example, '1:00'.
  • Loading branch information...
1 parent 8c4260e commit a0d0d8bd286e080c65637d0f35239c2fcafd51c5 @divide0 divide0 committed Feb 8, 2013
Showing with 6 additions and 0 deletions.
  1. +6 −0 spec/date.spec.js
View
@@ -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.