Skip to content

test_inject: fix localtime tests that depend on the current daylight saving time - #5583

Merged
Watson1978 merged 1 commit into
fluent:masterfrom
Watson1978:fix-test-inject-localtime-dst
Nov 2, 2026
Merged

Watson1978 merged 1 commit into
fluent:masterfrom
Watson1978:fix-test-inject-localtime-dst

Conversation

@Watson1978

Copy link
Copy Markdown
Contributor

Which issue(s) this PR fixes:
None.

What this PR does / why we need it:
Three inject_values_to_record tests built the expected value with the current UTC offset, but they format a time on 2016-06-21. In a time zone with daylight saving time, the two offsets differ for half of the year.

The windows-11-arm runner uses Pacific time while the other runners use UTC (actions/runner-images#15007). So the windows-11-arm jobs fail on master since daylight saving time ended in the US on 2026-11-01 (e.g. https://github.com/fluent/fluentd/actions/runs/41312649082/job/124866099700). A fix on the runner side would not help developers who run the tests in such a time zone.

This PR uses the UTC offset of the test date instead.

Docs Changes:
None.

Release Note:
None. This only fixes the tests.

🤖 Generated with Claude Code

…saving time

The expected values used the current UTC offset, but the tests format
a time on 2016-06-21. In a time zone with daylight saving time, the two
offsets differ for half of the year. The windows-11-arm runner uses
Pacific time while the other runners use UTC
(actions/runner-images#15007), so its jobs fail since daylight saving
time ended in the US on 2026-11-01.

Use the UTC offset of the test date instead.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Shizuo Fujita <fujita@clear-code.com>
@Watson1978 Watson1978 added this to the v1.21.0 milestone Nov 2, 2026
@Watson1978 Watson1978 added CI Test/CI issues backport to v1.19 We will backport this fix to the LTS branch labels Nov 2, 2026
@Watson1978
Watson1978 requested a review from kenhys November 2, 2026 01:48
@Watson1978
Watson1978 merged commit f55db4b into fluent:master Nov 2, 2026
20 checks passed
@Watson1978
Watson1978 deleted the fix-test-inject-localtime-dst branch November 2, 2026 02:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport to v1.19 We will backport this fix to the LTS branch CI Test/CI issues

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants