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

Incorrect timestamp formatting in Chrome v58 #378

Closed
robertknight opened this Issue May 6, 2017 · 6 comments

Comments

Projects
None yet
1 participant
@robertknight
Contributor

robertknight commented May 6, 2017

Steps to reproduce

  1. In Chrome v58, visit https://hyp.is/WFR3BrcdEeaiWs_vrn5GDg/blogs.dropbox.com/tech/2016/11/annotations-on-document-previews/
  2. Look at the timestamp on the annotation

Expected behaviour

The timestamp should be formatted as "30 Nov 2016"

Actual behaviour

screenshot 2017-05-06 16 40 37

Browser/system information

Chrome 58.0.3029.96 on OS X. Works as expected in Safari 10.1 and Firefox.

@robertknight

This comment has been minimized.

Show comment
Hide comment
@robertknight

robertknight May 9, 2017

Contributor

Test case derived from the logic in src/sidebar/time.js:

new Date('2016-11-01').toLocaleString(undefined, { day: 'numeric', month: 'short', year: 'numeric' })

// Chrome v58: "2016 M11 1"
// Safari, Firefox: 1 Nov 2016

The locale argument is optional, in which according to MDN the runtime's default locale is used. If "en" is passed as the locale argument then the output matches what is expected: "Nov 1, 2016".

Contributor

robertknight commented May 9, 2017

Test case derived from the logic in src/sidebar/time.js:

new Date('2016-11-01').toLocaleString(undefined, { day: 'numeric', month: 'short', year: 'numeric' })

// Chrome v58: "2016 M11 1"
// Safari, Firefox: 1 Nov 2016

The locale argument is optional, in which according to MDN the runtime's default locale is used. If "en" is passed as the locale argument then the output matches what is expected: "Nov 1, 2016".

@robertknight

This comment has been minimized.

Show comment
Hide comment
@robertknight

robertknight May 9, 2017

Contributor

This issue appears to occur only when the system language is set to English. If I change the system language to French on my OS X system and restart Chrome, the same expression evaluates to "1 nov. 2016".

Contributor

robertknight commented May 9, 2017

This issue appears to occur only when the system language is set to English. If I change the system language to French on my OS X system and restart Chrome, the same expression evaluates to "1 nov. 2016".

@robertknight

This comment has been minimized.

Show comment
Hide comment
@robertknight
Contributor

robertknight commented May 9, 2017

@robertknight

This comment has been minimized.

Show comment
Hide comment
@robertknight

robertknight May 24, 2017

Contributor

The upstream investigation is ongoing. In the meantime I note that I am unable to reproduce the problem in the dev version of Chrome (M60) locally.

Contributor

robertknight commented May 24, 2017

The upstream investigation is ongoing. In the meantime I note that I am unable to reproduce the problem in the dev version of Chrome (M60) locally.

@robertknight

This comment has been minimized.

Show comment
Hide comment
@robertknight

robertknight May 30, 2017

Contributor

This has been fixed upstream for Chrome 59 but it looks like the fix is not going to be backported to Chrome 58. We might want to put a workaround in place for a couple of months or so.

Contributor

robertknight commented May 30, 2017

This has been fixed upstream for Chrome 59 but it looks like the fix is not going to be backported to Chrome 58. We might want to put a workaround in place for a couple of months or so.

@robertknight

This comment has been minimized.

Show comment
Hide comment
@robertknight

robertknight Sep 26, 2017

Contributor

Chrome stable is now v61, so there isn't that much point in fixing this.

Contributor

robertknight commented Sep 26, 2017

Chrome stable is now v61, so there isn't that much point in fixing this.

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