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

Commit

Permalink
Adding 1/2 hour timezone test
Browse files Browse the repository at this point in the history
  • Loading branch information
gsmcwhirter committed Feb 20, 2013
1 parent 634d22a commit 59db7c8
Showing 1 changed file with 15 additions and 2 deletions.
17 changes: 15 additions & 2 deletions test/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,21 @@ exports["date3: more advanced"] = function (beforeExit, assert){

}

exports["date4: half hour timezones"] = function (beforeExit, assert){
var d = new TZDate("05-20-1983 12:00 pm", "America/New_York");
assert.eql(d.toString(), "1983-05-20 12:00:00 GMT-0400", "Base date 1 for 1/2 hour timezone test");

d.setTimezone("America/Caracas");
assert.eql(d.toString(), "1983-05-20 12:00:00 GMT-0400", "Old dates don't change");

var d2 = new TZDate("02-20-2013 12:00 pm", "America/New_York");
assert.eql(d2.toString(), "2013-02-20 12:00:00 GMT-0500", "Base date 2 for 1/2 hour timezone test");

d2.setTimezone("America/Caracas");
assert.eql(d2.toString(), "2013-02-20 12:30:00 GMT-0430", "New dates do change");

}

exports["timezones"] = function (beforeExit, assert){
var us_timezones = ["America/Adak",
"America/Anchorage",
Expand Down Expand Up @@ -81,8 +96,6 @@ exports["timezones"] = function (beforeExit, assert){

assert.eql(zoneinfo.listTimezones().length, 524, "Full timezone list");



};

exports["formatting"] = function (beforeExit, assert){
Expand Down

0 comments on commit 59db7c8

Please sign in to comment.