mde / timezone-js

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

Error while using the timezone.js script #148

Closed alkas1287 closed 10 years ago

alkas1287 commented 10 years ago

Please use the Fleegix.js XHR module, jQuery ajax, Zepto ajax, or define your own transport mechanism for downloading zone files.

longlho commented 10 years ago

Hmm not sure what the issue is?

alkas1287 commented 10 years ago

When trying to use the timezone.js with the following code

var dt = new window.timezoneJS.Date(new Date()); console.debug(dt.toString()); dt.setTimezone('America/Los_Angeles'); console.debug(dt.toString());

I am getting the error Please use the Fleegix.js XHR module, jQuery ajax, Zepto ajax, or define your own transport mechanism for downloading zone files.

longlho commented 10 years ago

Yeah you'll need some sort of ajax library so that it can download the tz files. I believe the instruction's in the documentation.