Skip to content

Commit 9f2c8a5

Browse files
san81chenqi0805
authored andcommitted
comparing an hour difference range for all the timezones (#5553)
Signed-off-by: Santhosh Gandhe <[email protected]>
1 parent 78962f9 commit 9f2c8a5

File tree

1 file changed

+3
-3
lines changed
  • data-prepper-plugins/saas-source-plugins/confluence-source/src/test/java/org/opensearch/dataprepper/plugins/source/confluence/utils

1 file changed

+3
-3
lines changed

data-prepper-plugins/saas-source-plugins/confluence-source/src/test/java/org/opensearch/dataprepper/plugins/source/confluence/utils/TimezoneHelperTest.java

+3-3
Original file line numberDiff line numberDiff line change
@@ -24,10 +24,10 @@ static Stream<Arguments> timezoneOffsetTestCases() {
2424
// Format: sourceZone, targetZone, expectedDuration
2525

2626
// Same timezone (should return zero)
27-
arguments(ZoneId.of("Europe/Paris"), ZoneId.of("Europe/Paris"), Duration.ofHours(0), Duration.ofHours(0)),
27+
arguments(ZoneId.of("Europe/Paris"), ZoneId.of("Europe/Paris"), Duration.ofHours(0), Duration.ofHours(-1)),
2828

2929
// Sydney to London (Sydney is ahead, so positive offset)
30-
arguments(ZoneId.of("Australia/Sydney"), ZoneId.of("Europe/London"), Duration.ofHours(11), Duration.ofHours(11)),
30+
arguments(ZoneId.of("Australia/Sydney"), ZoneId.of("Europe/London"), Duration.ofHours(11), Duration.ofHours(10)),
3131

3232
// New York to Tokyo (New York is behind, so negative offset)
3333
arguments(ZoneId.of("America/New_York"), ZoneId.of("Asia/Tokyo"), Duration.ofHours(-13), Duration.ofHours(-14)),
@@ -36,7 +36,7 @@ static Stream<Arguments> timezoneOffsetTestCases() {
3636
arguments(ZoneId.of("America/Los_Angeles"), ZoneId.of("Europe/Berlin"), Duration.ofHours(-8), Duration.ofHours(-9)),
3737

3838
// Auckland to Hawaii (crossing international date line)
39-
arguments(ZoneId.of("Pacific/Auckland"), ZoneId.of("Pacific/Honolulu"), Duration.ofHours(23), Duration.ofHours(23))
39+
arguments(ZoneId.of("Pacific/Auckland"), ZoneId.of("Pacific/Honolulu"), Duration.ofHours(23), Duration.ofHours(22))
4040
);
4141
}
4242

0 commit comments

Comments
 (0)