lpatmo / cb

UPDATE: the newer version of this repo is at github.com/codebuddiesdotorg/codebuddies
http://codebuddies.org
MIT License
71 stars 30 forks source link

Dates/times disappear on Safari 8.0.5 #63

Closed lpatmo closed 9 years ago

lpatmo commented 9 years ago

Thanks @dbgrandi for finding this bug!

wuworkshop commented 9 years ago

I figured out the culprit. It's your formattedHangoutDate function in new_post_title.js. Safari doesn't seem to understand Intl.DateTimeFormat().resolvedOptions().timeZone. It throws a ReferenceError:

ReferenceError: Can't find variable: Intl.

Chrome understands it and Firefox just gives you undefined. If you want to see what I'm talking about, run these commands in the browser consoles:

new Date();
Intl.DateTimeFormat().resolvedOptions().timeZone;

Just came across this comment in the moment-timezone repo: https://github.com/moment/moment-timezone/issues/138#issuecomment-77940479

Intl.DateTimeFormat().resolvedOptions().timeZone seems to only work in the latest Chrome and Opera (at least in my Mac versions, haven't checked Windows).

lpatmo commented 9 years ago

Resolved by @wuworkshop! Fourth person to make a pull request to /cb!

firework1