kaydensigh / chromecalclock

A calendar and clock widget.
Apache License 2.0
19 stars 7 forks source link

White window, the cog and a clock pointing at 12 a.m. #3

Closed oktayacikalin closed 9 years ago

oktayacikalin commented 9 years ago

Since a couple of weeks it's completely broken. Just showing a white window, the cog and a clock pointing at 12 a.m.. There are also several reports on the web store.

Please fix it. Chrome OS is missing this handy little calendar clock very much!

The JavaScript console is showing this: unload is not available in packaged apps.message @ extensions::platformApp:17

Uncaught RangeError: Expected Area/Location for time zone, got CET NewDateTimeFormat @ main.js:46 (anonymous function) @ main.js:83 rebuildClocks @ main.js:82 (anonymous function) @ main.js:316 defn @ mootools-1.2.6-core-nc.js:2157

kaydensigh commented 9 years ago

Thank you for posting the console output, I saw the reports on web store but was unable to reproduce.

I think the bug is because jstz.determine() is returning a timezone string that Intl.DateTimeFormat doesn't understand. Would you mind going to this page and telling me what it thinks your time zone is? http://pellepim.bitbucket.org/jstz/

I'm on vacation at the moment so I'll fix this when I get back in a couple of weeks.

oktayacikalin commented 9 years ago

It's telling me that it's Europe/Berlin - which is correct. But your code is getting CET. The code which complains is only understanding UTC or Area/Location. I tried debugging it, but had not much time, yet. It looks like the behavior changed over time... (I did not try using an older version of chromecalclock)

oktayacikalin commented 9 years ago

The page is loading jstimezonedetect version 1.0.4, which is returning Europe/Berlin. But 1.0.5 in the extension is returning CET.

kaydensigh commented 9 years ago

Okay, I think it's fixed now. I've changed it so that the output of jstz.determine().name() is only used to display the name of the local time zone, rather than trust that it is something I can pass to DateTimeFormat. It also fails a bit more gracefully by discarding time zones that Chrome is unhappy about.

Unfortunately, I still couldn't repro the bug. Please let me know if it's still broken for you. I tried setting my time zone to Berlin and a few other European zones, but jstimezonedetect would not return CET. I think because if DateTimeFormat.resolvedOptions().timeZone works (which it does for me) jstz will use that. The chromium bug is http://crbug.com/466014.

Thanks again for your help with this.

oktayacikalin commented 9 years ago

Sorry for my late answer. Just switched back to the web store version - works fine again. Thank you!