Skip to content

Disable tests for one more timezone #424

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

Merged
merged 9 commits into from
Aug 19, 2024
Merged

Disable tests for one more timezone #424

merged 9 commits into from
Aug 19, 2024

Conversation

dkhalanskyjb
Copy link
Collaborator

No description provided.

@dkhalanskyjb dkhalanskyjb changed the title Add more diagnostic information for analysing a flaky test Fix one more discrepancy with Windows Aug 9, 2024
@dkhalanskyjb dkhalanskyjb requested review from ilya-g and removed request for ilya-g August 9, 2024 11:04
@dkhalanskyjb dkhalanskyjb marked this pull request as draft August 9, 2024 12:29
@dkhalanskyjb
Copy link
Collaborator Author

Looks like Paraguay Standard Time is another strange one.

The error message after all these manipulations is (formatted for convenience):

kotlin.AssertionError: Expected 2025-03-29T22:59:59.998, got 2025-03-29T23:59:59.998 in zone Paraguay Standard Time at 2025-03-30T02:59:59.998Z
(our guess at the offset is -03:00).
The rules are
-03:00 until 2008-03-09T03:00:00Z,
-04:00 until 2008-10-19T04:00:00Z,
-03:00 until 2009-03-08T03:00:00Z,
-04:00 until 2009-10-18T04:00:00Z,
-03:00 until 2010-04-11T03:00:00Z,
-04:00 until 2010-10-03T04:00:00Z,
-03:00 until 2011-04-10T03:00:00Z,
-04:00 until 2011-10-02T04:00:00Z,
-03:00 until 2012-04-08T03:00:00Z,
-04:00 until 2012-10-07T04:00:00Z,
-03:00 until 2013-03-24T03:00:00Z,
-04:00 until 2013-10-06T04:00:00Z,
-03:00 until 2014-03-23T03:00:00Z,
-04:00 until 2014-10-05T04:00:00Z,
-03:00 until 2015-03-22T03:00:00Z,
-04:00 until 2015-10-04T04:00:00Z,
-03:00 until 2016-03-27T03:00:00Z,
-04:00 until 2016-10-02T04:00:00Z,
-03:00 until 2017-03-26T03:00:00Z,
-04:00 until 2017-10-01T04:00:00Z,
-03:00 until 2018-03-25T03:00:00Z,
-04:00 until 2018-10-07T04:00:00Z,
-03:00 until 2019-03-24T03:00:00Z,
-04:00 until 2019-10-06T04:00:00Z,
-03:00 until 2020-03-22T03:00:00Z,
-04:00 until 2020-10-04T04:00:00Z,
-03:00 until 2021-03-28T03:00:00Z,
-04:00 until 2021-10-03T04:00:00Z,
-03:00 until 2022-03-27T03:00:00Z,
-04:00 until 2022-10-02T04:00:00Z,
-03:00 until 2023-03-26T03:00:00Z,
-04:00 until 2023-10-01T04:00:00Z,
-03:00 until 2024-01-01T03:00:00Z,
then -03:00, after that
transitioning from -04:00 to -03:00 on OCTOBER, the first SATURDAY, 86400 seconds since the day start, wall clock offset,
transitioning from -03:00 to -04:00 on MARCH, the last SATURDAY, 86400 seconds since the day start, wall clock offset,
and the offsets throughout the year according to Windows are:
[(2025-01-01, -10800),
 (2025-01-02, -10800),
 (2025-01-03, -10800),
 (2025-01-04, -10800),
 (2025-01-05, -10800),
 (2025-01-06, -10800),
 (2025-01-07, -10800),
 (2025-01-08, -10800),
 (2025-01-09, -10800),
 (2025-01-10, -10800),
 (2025-01-11, -10800),
 (2025-01-12, -10800),
 (2025-01-13, -10800),
 (2025-01-14, -10800),
 (2025-01-15, -10800),
 (2025-01-16, -10800),
 (2025-01-17, -10800),
 (2025-01-18, -10800),
 (2025-01-19, -10800),
 (2025-01-20, -10800),
 (2025-01-21, -10800),
 (2025-01-22, -10800),
 (2025-01-23, -10800),
 (2025-01-24, -10800),
 (2025-01-25, -10800),
 (2025-01-26, -10800),
 (2025-01-27, -10800),
 (2025-01-28, -10800),
 (2025-01-29, -10800),
 (2025-01-30, -10800),
 (2025-01-31, -10800),
 (2025-02-01, -10800),
 (2025-02-02, -10800),
 (2025-02-03, -10800),
 (2025-02-04, -10800),
 (2025-02-05, -10800),
 (2025-02-06, -10800),
 (2025-02-07, -10800),
 (2025-02-08, -10800),
 (2025-02-09, -10800),
 (2025-02-10, -10800),
 (2025-02-11, -10800),
 (2025-02-12, -10800),
 (2025-02-13, -10800),
 (2025-02-14, -10800),
 (2025-02-15, -10800),
 (2025-02-16, -10800),
 (2025-02-17, -10800),
 (2025-02-18, -10800),
 (2025-02-19, -10800),
 (2025-02-20, -10800),
 (2025-02-21, -10800),
 (2025-02-22, -10800),
 (2025-02-23, -10800),
 (2025-02-24, -10800),
 (2025-02-25, -10800),
 (2025-02-26, -10800),
 (2025-02-27, -10800),
 (2025-02-28, -10800),
 (2025-03-01, -10800),
 (2025-03-02, -10800),
 (2025-03-03, -10800),
 (2025-03-04, -10800),
 (2025-03-05, -10800),
 (2025-03-06, -10800),
 (2025-03-07, -10800),
 (2025-03-08, -10800),
 (2025-03-09, -10800),
 (2025-03-10, -10800),
 (2025-03-11, -10800),
 (2025-03-12, -10800),
 (2025-03-13, -10800),
 (2025-03-14, -10800),
 (2025-03-15, -10800),
 (2025-03-16, -10800),
 (2025-03-17, -10800),
 (2025-03-18, -10800),
 (2025-03-19, -10800),
 (2025-03-20, -10800),
 (2025-03-21, -10800),
 (2025-03-22, -10800),
 (2025-03-23, -10800),
 (2025-03-24, -14400),
 (2025-03-25, -14400),
 (2025-03-26, -14400),
 (2025-03-27, -14400),
 (2025-03-28, -14400),
 (2025-03-29, -14400),
 (2025-03-30, -14400),
 (2025-03-31, -14400),
 (2025-04-01, -14400),
 (2025-04-02, -14400),
 (2025-04-03, -14400),
 (2025-04-04, -14400),
 (2025-04-05, -14400),
 (2025-04-06, -14400),
 (2025-04-07, -14400),
 (2025-04-08, -14400),
 (2025-04-09, -14400),
 (2025-04-10, -14400),
 (2025-04-11, -14400),
 (2025-04-12, -14400),
 (2025-04-13, -14400),
 (2025-04-14, -14400),
 (2025-04-15, -14400),
 (2025-04-16, -14400),
 (2025-04-17, -14400),
 (2025-04-18, -14400),
 (2025-04-19, -14400),
 (2025-04-20, -14400),
 (2025-04-21, -14400),
 (2025-04-22, -14400),
 (2025-04-23, -14400),
 (2025-04-24, -14400),
 (2025-04-25, -14400),
 (2025-04-26, -14400),
 (2025-04-27, -14400),
 (2025-04-28, -14400),
 (2025-04-29, -14400),
 (2025-04-30, -14400),
 (2025-05-01, -14400),
 (2025-05-02, -14400),
 (2025-05-03, -14400),
 (2025-05-04, -14400),
 (2025-05-05, -14400),
 (2025-05-06, -14400),
 (2025-05-07, -14400),
 (2025-05-08, -14400),
 (2025-05-09, -14400),
 (2025-05-10, -14400),
 (2025-05-11, -14400),
 (2025-05-12, -14400),
 (2025-05-13, -14400),
 (2025-05-14, -14400),
 (2025-05-15, -14400),
 (2025-05-16, -14400),
 (2025-05-17, -14400),
 (2025-05-18, -14400),
 (2025-05-19, -14400),
 (2025-05-20, -14400),
 (2025-05-21, -14400),
 (2025-05-22, -14400),
 (2025-05-23, -14400),
 (2025-05-24, -14400),
 (2025-05-25, -14400),
 (2025-05-26, -14400),
 (2025-05-27, -14400),
 (2025-05-28, -14400),
 (2025-05-29, -14400),
 (2025-05-30, -14400),
 (2025-05-31, -14400),
 (2025-06-01, -14400),
 (2025-06-02, -14400),
 (2025-06-03, -14400),
 (2025-06-04, -14400),
 (2025-06-05, -14400),
 (2025-06-06, -14400),
 (2025-06-07, -14400),
 (2025-06-08, -14400),
 (2025-06-09, -14400),
 (2025-06-10, -14400),
 (2025-06-11, -14400),
 (2025-06-12, -14400),
 (2025-06-13, -14400),
 (2025-06-14, -14400),
 (2025-06-15, -14400),
 (2025-06-16, -14400),
 (2025-06-17, -14400),
 (2025-06-18, -14400),
 (2025-06-19, -14400),
 (2025-06-20, -14400),
 (2025-06-21, -14400),
 (2025-06-22, -14400),
 (2025-06-23, -14400),
 (2025-06-24, -14400),
 (2025-06-25, -14400),
 (2025-06-26, -14400),
 (2025-06-27, -14400),
 (2025-06-28, -14400),
 (2025-06-29, -14400),
 (2025-06-30, -14400),
 (2025-07-01, -14400),
 (2025-07-02, -14400),
 (2025-07-03, -14400),
 (2025-07-04, -14400),
 (2025-07-05, -14400),
 (2025-07-06, -14400),
 (2025-07-07, -14400),
 (2025-07-08, -14400),
 (2025-07-09, -14400),
 (2025-07-10, -14400),
 (2025-07-11, -14400),
 (2025-07-12, -14400),
 (2025-07-13, -14400),
 (2025-07-14, -14400),
 (2025-07-15, -14400),
 (2025-07-16, -14400),
 (2025-07-17, -14400),
 (2025-07-18, -14400),
 (2025-07-19, -14400),
 (2025-07-20, -14400),
 (2025-07-21, -14400),
 (2025-07-22, -14400),
 (2025-07-23, -14400),
 (2025-07-24, -14400),
 (2025-07-25, -14400),
 (2025-07-26, -14400),
 (2025-07-27, -14400),
 (2025-07-28, -14400),
 (2025-07-29, -14400),
 (2025-07-30, -14400),
 (2025-07-31, -14400),
 (2025-08-01, -14400),
 (2025-08-02, -14400),
 (2025-08-03, -14400),
 (2025-08-04, -14400),
 (2025-08-05, -14400),
 (2025-08-06, -14400),
 (2025-08-07, -14400),
 (2025-08-08, -14400),
 (2025-08-09, -14400),
 (2025-08-10, -14400),
 (2025-08-11, -14400),
 (2025-08-12, -14400),
 (2025-08-13, -14400),
 (2025-08-14, -14400),
 (2025-08-15, -14400),
 (2025-08-16, -14400),
 (2025-08-17, -14400),
 (2025-08-18, -14400),
 (2025-08-19, -14400),
 (2025-08-20, -14400),
 (2025-08-21, -14400),
 (2025-08-22, -14400),
 (2025-08-23, -14400),
 (2025-08-24, -14400),
 (2025-08-25, -14400),
 (2025-08-26, -14400),
 (2025-08-27, -14400),
 (2025-08-28, -14400),
 (2025-08-29, -14400),
 (2025-08-30, -14400),
 (2025-08-31, -14400),
 (2025-09-01, -14400),
 (2025-09-02, -14400),
 (2025-09-03, -14400),
 (2025-09-04, -14400),
 (2025-09-05, -14400),
 (2025-09-06, -14400),
 (2025-09-07, -14400),
 (2025-09-08, -14400),
 (2025-09-09, -14400),
 (2025-09-10, -14400),
 (2025-09-11, -14400),
 (2025-09-12, -14400),
 (2025-09-13, -14400),
 (2025-09-14, -14400),
 (2025-09-15, -14400),
 (2025-09-16, -14400),
 (2025-09-17, -14400),
 (2025-09-18, -14400),
 (2025-09-19, -14400),
 (2025-09-20, -14400),
 (2025-09-21, -14400),
 (2025-09-22, -14400),
 (2025-09-23, -14400),
 (2025-09-24, -14400),
 (2025-09-25, -14400),
 (2025-09-26, -14400),
 (2025-09-27, -14400),
 (2025-09-28, -14400),
 (2025-09-29, -14400),
 (2025-09-30, -14400),
 (2025-10-01, -14400),
 (2025-10-02, -14400),
 (2025-10-03, -14400),
 (2025-10-04, -14400),
 (2025-10-05, -14400),
 (2025-10-06, -10800),
 (2025-10-07, -10800),
 (2025-10-08, -10800),
 (2025-10-09, -10800),
 (2025-10-10, -10800),
 (2025-10-11, -10800),
 (2025-10-12, -10800),
 (2025-10-13, -10800),
 (2025-10-14, -10800),
 (2025-10-15, -10800),
 (2025-10-16, -10800),
 (2025-10-17, -10800),
 (2025-10-18, -10800),
 (2025-10-19, -10800),
 (2025-10-20, -10800),
 (2025-10-21, -10800),
 (2025-10-22, -10800),
 (2025-10-23, -10800),
 (2025-10-24, -10800),
 (2025-10-25, -10800),
 (2025-10-26, -10800),
 (2025-10-27, -10800),
 (2025-10-28, -10800),
 (2025-10-29, -10800),
 (2025-10-30, -10800),
 (2025-10-31, -10800),
 (2025-11-01, -10800),
 (2025-11-02, -10800),
 (2025-11-03, -10800),
 (2025-11-04, -10800),
 (2025-11-05, -10800),
 (2025-11-06, -10800),
 (2025-11-07, -10800),
 (2025-11-08, -10800),
 (2025-11-09, -10800),
 (2025-11-10, -10800),
 (2025-11-11, -10800),
 (2025-11-12, -10800),
 (2025-11-13, -10800),
 (2025-11-14, -10800),
 (2025-11-15, -10800),
 (2025-11-16, -10800),
 (2025-11-17, -10800),
 (2025-11-18, -10800),
 (2025-11-19, -10800),
 (2025-11-20, -10800),
 (2025-11-21, -10800),
 (2025-11-22, -10800),
 (2025-11-23, -10800),
 (2025-11-24, -10800),
 (2025-11-25, -10800),
 (2025-11-26, -10800),
 (2025-11-27, -10800),
 (2025-11-28, -10800),
 (2025-11-29, -10800),
 (2025-11-30, -10800),
 (2025-12-01, -10800),
 (2025-12-02, -10800),
 (2025-12-03, -10800),
 (2025-12-04, -10800),
 (2025-12-05, -10800),
 (2025-12-06, -10800),
 (2025-12-07, -10800),
 (2025-12-08, -10800),
 (2025-12-09, -10800),
 (2025-12-10, -10800),
 (2025-12-11, -10800),
 (2025-12-12, -10800),
 (2025-12-13, -10800),
 (2025-12-14, -10800),
 (2025-12-15, -10800),
 (2025-12-16, -10800),
 (2025-12-17, -10800),
 (2025-12-18, -10800),
 (2025-12-19, -10800),
 (2025-12-20, -10800),
 (2025-12-21, -10800),
 (2025-12-22, -10800),
 (2025-12-23, -10800),
 (2025-12-24, -10800),
 (2025-12-25, -10800),
 (2025-12-26, -10800),
 (2025-12-27, -10800),
 (2025-12-28, -10800),
 (2025-12-29, -10800),
 (2025-12-30, -10800),
 (2025-12-31, -10800)];
the raw data for the recurring rules is
f000000000000000c4ffffff000003000600050017003b003b00e70300000a000600010017003b003b00e703

According to Windows, DST starts in 2025 on 2025-03-24 ± 1 day.

Let's go through raw data manually.

f0000000 - bias
00000000 - standard bias
c4ffffff - daylight bias

Dates:
0000 0300 0600 0500 1700 3b00 3b00 e703
0000 0a00 0600 0100 1700 3b00 3b00 e703
--------------------------------------- switch endianness
0000 0003 0006 0005 0017 003b 003b 03e7
0000 000a 0006 0001 0017 003b 003b 03e7
--------------------------------------- convert to decimal
0000 0003 0006 0005 0023 0059 0059 0999
0000 0010 0006 0001 0023 0059 0059 0999
year mont dow  day  hour minu seco mill
          Saturday

See https://learn.microsoft.com/en-us/windows/win32/api/timezoneapi/ns-timezoneapi-time_zone_information for how to interpret the numbers. What I'm seeing is: March, the last occurrence of Saturday, 23:59:59.999.

Finally,

        März        
Mo Di Mi Do Fr Sa So
                1  2
 3  4  5  6  7  8  9
10 11 12 13 14 15 16
17 18 19 20 21 22 23
24 25 26 27 28 29 30
31         

No matter how you turn this, the last Saturday and Sunday are not the 24th, nor the 23rd.

@dkhalanskyjb dkhalanskyjb changed the title Fix one more discrepancy with Windows Disable tests for one more timezone Aug 9, 2024
@dkhalanskyjb dkhalanskyjb marked this pull request as ready for review August 9, 2024 13:34
@dkhalanskyjb dkhalanskyjb requested a review from ilya-g August 9, 2024 13:35
.toInstant(lastOffset)
transitionEpochSeconds.add(newYearInLastOffset.epochSeconds)
}
offsets.add(recurring.offsetAtYearStart())
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can it create a transition from an offset to the same offset if added unconditionally?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, but I can't think of a way to see the extra transitions using the API exposed to our users.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok, let's think about it if/when we're going to expose transition rules later

@ilya-g ilya-g mentioned this pull request Aug 15, 2024
@dkhalanskyjb dkhalanskyjb merged commit 1cb9cdb into master Aug 19, 2024
1 check passed
@dkhalanskyjb dkhalanskyjb deleted the catch-flaky-test branch August 19, 2024 12:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants