mde / timezone-js

DEPRECATED: Timezone-enabled JavaScript Date object. Uses Olson zoneinfo files for timezone data.
824 stars 183 forks source link

Wrong Date conversion for the years below 1947 in Kuwait Timezone(UTC+3). #188

Closed Ashritha960 closed 4 years ago

Ashritha960 commented 4 years ago

Year below 1947 are failing to produce the proper date using timezoneJS 0.4.13.

In date.js , in setFromTimeProxy(), var tzOffset = tz ? timezoneJS.timezone.getTzInfo(utcMillis, tz, true).tzOffset : dt.getTimezoneOffset(); For kuwait, the tzoffset should be -180. But, for the dates below 1947 the tzoffset is giving as -186. I tried to insert date as 1-01-1946, but it was converted as 31-12-1945.

And also I am getting Error : 1)Please use the Fleegix.js XHR module, jQuery ajax, Zepto ajax, or define your own transport mechanism for downloading zone files.

2)Timezone 'Mon Jan 01 1912 03:06:52 GMT+0306 (Arabian Standard Time)-52000' is either incorrect, or not loaded in the timezone registry.

mde commented 4 years ago

This library is no longer maintained.