keithamus/Tempus — pull request #12 by llafuente (2012-04-09 14:49:13+00:00)
Title: fix timeszone offset issues 

Thats right.

Fix timezone issues: 26 hours, no increment days etc...
issue #2 in the list, and the most anoying atm for me.

It's a bit messy because of the trailing spaces but dont have time to clean up the commit sry.

-------
TO TEST

var dref = Tempus("2012-04-09T23:55:00.000+0000");

console.log(dref.toString());

//increment one hour / day
console.log(dref.timezone(-60).toString());
console.log(dref.timezone(-120).toString());
console.log(dref.timezone(-180).toString());
console.log(dref.timezone(-240).toString());
console.log(dref.timezone(-320).toString());
console.log(dref.timezone(-400).toString());

//plus one month
console.log(Tempus("2012-04-30T23:55:00.000+0000").timezone(-180).toString());
console.log(Tempus("2012-04-30T23:55:00.000+0000").toString());

//plus year
console.log(Tempus("2011-12-31T23:55:00.000+0000").timezone(-180).toString());
console.log(Tempus("2011-12-31T23:55:00.000+0000").toString());

//plus with no GMT0
console.log(Tempus("2012-04-09T23:55:00.000+0200").timezone(-180).toString());
console.log(Tempus("2012-04-09T23:55:00.000+0000").timezone(0).toString());