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

[gardening] corelib/date_time7_test summer time #55159

Closed
dcharkes opened this issue Mar 11, 2024 · 1 comment
Closed

[gardening] corelib/date_time7_test summer time #55159

dcharkes opened this issue Mar 11, 2024 · 1 comment
Assignees

Comments

@dcharkes
Copy link
Contributor

/=====================================================================\
| corelib/date_time7_test broke (Pass -> RuntimeError, expected Pass) |
\=====================================================================/

--- Command "vm" (took 01.000221s):
set DART_CONFIGURATION=ReleaseX64 & set DART_SUPPRESS_WER=1 & set DART_CRASHPAD_HANDLER=C:\b\s\w\ir\out\ReleaseX64\crashpad_handler.exe & out\ReleaseX64\dart.exe --sound-null-safety -Dtest_runner.configuration=vm-win-release-x64 --ignore-unrecognized-flags --packages=C:\b\s\w\ir\.dart_tool\package_config.json C:\b\s\w\ir\tests\corelib\date_time7_test.dart

exit code:
255

stderr:
Unhandled exception:
Expect.equals(expected: <-7>, actual: <-8>) fails.
#0      Expect._fail (package:expect/expect.dart:722:5)
#1      Expect.equals (package:expect/expect.dart:125:5)
#2      testLocal.checkOffset (file:///C:/b/s/w/ir/tests/corelib/date_time7_test.dart:36:16)
#3      testLocal (file:///C:/b/s/w/ir/tests/corelib/date_time7_test.dart:46:3)
#4      main (file:///C:/b/s/w/ir/tests/corelib/date_time7_test.dart:55:3)
#5      _delayEntrypointInvocation.<anonymous closure> (dart:isolate-patch/isolate_patch.dart:297:19)
#6      _RawReceivePort._handleMessage (dart:isolate-patch/isolate_patch.dart:184:12)

--- Re-run this test:
python3 tools/test.py -n vm-win-release-x64 corelib/date_time7_test
      case "PDT" || "Pacific Daylight Time":
        Expect.equals(-7, offset.inHours);

log

cc @parlough Your test might not be working correctly with daylight savings.

Different parts of the world change to summer time on different dates.

  • US: Sunday, 10 March 2024
  • Europe: Sunday, 31 March 2024
@parlough
Copy link
Member

parlough commented Mar 11, 2024

I'm not at a computer right now to check, but I faintly remember my change only affecting the Wasm backend.

However, I think Pacific Daylight Time should still be -7 no matter what. So this is potentially an existing VM issue that the additional test cases ended up catching.

Perhaps https://dart-review.googlesource.com/c/sdk/+/356681 will fix it?

copybara-service bot pushed a commit that referenced this issue Mar 19, 2024
It needs to look at the given moment to decide whether to use
summer time zone name or standard time zone name.

Previously it was looking at the current time to make this decision
which produced incorrect result: e.g. given
`DateTime.parse(2012-01-02T13:45:23)` its `timeZoneName` should be
returning standard name corresponding to the current time zone even
if we are currently running in summer time (e.g. it should
return PST if machine it is running on is in PDT).

This is revealed by a test which started to fail on Windows
because our Windows bots entered PDT.

Fixes #55159

TEST=corelib/date_time7_test.dart

CoreLibraryReviewExempt: No core library changes.
Cherry-pick: https://dart-review.googlesource.com/c/sdk/+/356681
Cherry-pick-request: #55240
Change-Id: Id4b593edfb4f0df967ff04d72efa86f320cc4e8f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/358420
Reviewed-by: Siva Annamalai <[email protected]>
Commit-Queue: Kevin Chisholm <[email protected]>
copybara-service bot pushed a commit that referenced this issue Mar 19, 2024
It needs to look at the given moment to decide whether to use
summer time zone name or standard time zone name.

Previously it was looking at the current time to make this decision
which produced incorrect result: e.g. given
`DateTime.parse(2012-01-02T13:45:23)` its `timeZoneName` should be
returning standard name corresponding to the current time zone even
if we are currently running in summer time (e.g. it should
return PST if machine it is running on is in PDT).

This is revealed by a test which started to fail on Windows
because our Windows bots entered PDT.

Fixes #55159

TEST=corelib/date_time7_test.dart

CoreLibraryReviewExempt: No core library changes.
Cherry-pick: https://dart-review.googlesource.com/c/sdk/+/356681
Cherry-pick-request: #55240
Change-Id: I11fb963ec90055db168c7f34bdf7c58229085bd1
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/358440
Reviewed-by: Siva Annamalai <[email protected]>
Commit-Queue: Kevin Chisholm <[email protected]>
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

2 participants