Skip to content
This repository has been archived by the owner on Dec 11, 2019. It is now read-only.

'update date handling' unit tests fail for some timezones #12370

Closed
petemill opened this issue Dec 21, 2017 · 3 comments · Fixed by #12372
Closed

'update date handling' unit tests fail for some timezones #12370

petemill opened this issue Dec 21, 2017 · 3 comments · Fixed by #12372

Comments

@petemill
Copy link
Member

petemill commented Dec 21, 2017

Test plan

#12372 (comment)


Description

The following test fails, because the epoch 1510687381887 is not 2017-11-14 in every timezone. For example I ran the tests in the NZ timezone, where that time is 2017-11-15. I would change this myself to a more universal time, but it's unclear if any real code which relies on this needs to take timezone in to account.

  1) update date handling todayYMD returns YYYY-MM-DD of today:

      AssertionError [ERR_ASSERTION]: today
      + expected - actual

      -2017-11-15
      +2017-11-14

      at Context.<anonymous> (test/unit/app/browser/datesTest.js:23:14)

Steps to Reproduce

  1. Change local timezone to New Zealand
  2. npm run unittest -- --grep "update date handling"
@diracdeltas
Copy link
Member

i also noticed this but forgot about new zealand being on earth: #12192

@diracdeltas
Copy link
Member

actually it looks like 10:30 AM UTC falls on the same day in every timezone :). i can fix this

@diracdeltas diracdeltas self-assigned this Dec 21, 2017
diracdeltas added a commit that referenced this issue Dec 22, 2017
fix #12370 by changing the test to use a time of day that is on the same day in all timezones

Test Plan:
Change local timezone to New Zealand
unittests should pass
petemill pushed a commit that referenced this issue Dec 22, 2017
fix #12370 by changing the test to use a time of day that is on the same day in all timezones

Test Plan:
Change local timezone to New Zealand
unittests should pass
@luixxiul luixxiul added this to the 0.22.x (Nightly Channel) milestone Dec 22, 2017
@bbondy bbondy modified the milestones: 0.22.x (Developer Channel), 0.23.x (Nightly Channel) Feb 25, 2018
@srirambv
Copy link
Collaborator

srirambv commented Jun 19, 2018

Verified on Windows 10 x64 using

  • 0.23.11 - 6565c06
  • Muon - 7.1.0
  • libchromiumcontent - 67.0.3396.87

Verified on macOS 10.13.4 x64 using the following build:

  • 0.23.11 6565c06
  • muon: 7.1.0
  • libchromiumcontent: 67.0.3396.87

Verified on Ubuntu 17.10 x64

  • 0.23.11 - 6565c06
  • Muon - 7.1.0
  • libchromiumcontent - 67.0.3396.87

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