mde / timezone-js

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

str.split is not a function #39

Closed ramkumarc closed 12 years ago

ramkumarc commented 12 years ago

I have just added the js. Then added these 2 lines of code

timezoneJS.timezone.zoneFileBasePath = "Timezone"; //Its in the same folder in a separate folder called timezone. timezoneJS.timezone.init();

I get

str.split is not a function var lines = str.split('\n')

line 811 date.js file...

I get that error on load itself. Can you please help me on this..

Browser : Firefox

Is this something to do with the timezone path ??

ramkumarc commented 12 years ago

The error is only for the northamerica file for iana.org. It works for all other timezone except for America. So i think it is unable to parse through northamerica file.

longlho commented 12 years ago

I believe so. The tz path is the relative path from where u init the timezoneJS.init()

Long Ho Sent with Sparrow (http://www.sparrowmailapp.com/?sig)

On Friday, July 27, 2012 at 1:55 AM, ramkumarc wrote:

I have just added the js. Then added these 2 lines of code

timezoneJS.timezone.zoneFileBasePath = "Timezone"; //Its in the same folder in a separate folder called timezone. timezoneJS.timezone.init();

I get

str.split is not a function var lines = str.split('\n')

line 811 date.js file...

I get that error on load itself. Can you please help me on this..

Browser : Firefox

Is this something to do with the timezone path ??


Reply to this email directly or view it on GitHub: https://github.com/mde/timezone-js/issues/39

longlho commented 12 years ago

It's pretty unlikely that it's tz specific since the unit tests loads all timezone files. I'll double check if there're new versions of tz files that might break this.

longlho commented 12 years ago

Can you provide some sample codes?

ramkumarc commented 12 years ago

I am just initializing.. as mentioned those are just the 2 lines of code. during init date.js is unable to parse north america file. so thats y i get that error. so if i use any other timezone say europe it is working but it doesnt work for america.

On Fri, Jul 27, 2012 at 9:35 AM, Long Ho < reply@reply.github.com

wrote:

Can you provide some sample codes?


Reply to this email directly or view it on GitHub: https://github.com/mde/timezone-js/issues/39#issuecomment-7309905

longlho commented 12 years ago

Try timezoneJS.timezone.init({ async: false }). Loading and parsing multiple timezone files is not allowed at this point. Let me know how that goes.

ramkumarc commented 12 years ago

Thanks. It works.

On Fri, Jul 27, 2012 at 10:20 AM, Long Ho < reply@reply.github.com

wrote:

Try timezoneJS.timezone.init({ async: false }). Loading and parsing multiple timezone is not allowed at this point. Let me know how that goes.


Reply to this email directly or view it on GitHub: https://github.com/mde/timezone-js/issues/39#issuecomment-7310960

longlho commented 12 years ago

Cool :)