timezoneJS constructor returns wrong offset and timezone
avinsrid opened this issue · 1 comments
Hi,
Here is a simple example of why this constructor fails when we pass in the timezone argument:
new timezoneJS.Date('Asia/Kolkata')
t…S.Date {_useCache: false, _tzInfo: Object, day: 4, year: 2016, month: 1…}dateProxy: Thu Feb 11 2016 00:45:41 GMT-0500 (Eastern Standard Time)proto: Date_day: 4_timeProxy: 1455151541179_tzInfo: Object_useCache: falsedate: 11hours: 0milliseconds: 179minutes: 45month: 1seconds: 41timezone: "Asia/Kolkata"year: 2016__proto: Object
The time is correct, but it still tells Eastern Standard Time and GMT -0500
Same is when we enter 'Etc/UTC' argument, we get the following:
new timezoneJS.Date('Etc/UTC')
_dateProxy: Wed Feb 10 2016 19:19:09 GMT-0500 (Eastern Standard Time)
It would be great if someone could correct what I am doing here.
~Avinash
This library is no longer maintained, and this repo is here only for historical interest.