Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CPTimeZone: time zone methods return nil in Chrome and Firefox #2855

Open
brianmpalma opened this issue Jul 25, 2019 · 4 comments
Open

CPTimeZone: time zone methods return nil in Chrome and Firefox #2855

brianmpalma opened this issue Jul 25, 2019 · 4 comments

Comments

@brianmpalma
Copy link
Contributor

brianmpalma commented Jul 25, 2019

In Chrome (Version 75.0.3770.142) and Firefox (67.0.4), the following CPTimeZone methods return nil:

  • +defaultTimeZone
  • +localTimeZone
  • +systemTimeZone

Cursory research for the America/New_York and America/Los_Angeles time zones show a change in the values provided by browsers that are parsed into abbreviations by Cappuccino. Instead of EDT and PDT, the parsed abbreviations are now Eastern Daylight Time and Pacific Daylight Time. These abbreviations are not keys in the abbreviationDictionary and thus nil is returned (line 300 in CPTimeZone.j).

Due to +systemTimeZone returning nil, CPDateFormatter is also affected and is initialized with a nil value for it's _timeZone variable (A separate issue can be logged if preferred).

Notes

  • This issue has yet to be tested with time zones outside of America/New_York and America/Los_Angeles.
  • Safari works as expected.
@cappbot cappbot added this to the Someday milestone Jul 25, 2019
@cappbot cappbot added the #new label Jul 25, 2019
@cappbot
Copy link

cappbot commented Jul 25, 2019

Milestone: Someday. Label: #new. What's next? A reviewer should examine this issue.

@brianmpalma
Copy link
Contributor Author

Update

After attempting a local hack to temporarily resolve the issue, it's come to attention that Chrome (have yet to test Firefox) variably changes the value within parentheses that is used for the abbreviation.

The date used to determine time zones, when printed is: Wed Jul 24 2019 23:27:44 GMT-0400 (GMT-04:00). GMT-04:00 is another abbreviation value. It doesn't exist as a key in the abbreviationDictionary though it does exist as a value in the English localized names for the Chile time zones. It also applies to America/New_York during Eastern Daylight Time.

@daboe01
Copy link
Contributor

daboe01 commented Oct 7, 2019

-#new
+Foundation
+Chrome

@cappbot
Copy link

cappbot commented Oct 7, 2019

Milestone: Someday. Labels: Chrome, Foundation. What's next? A reviewer should examine this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants