Skip to content

Fix Southern Hemisphere DST detection in browser info - #1975

Merged
bitstorm merged 1 commit into
apache:masterfrom
teldigi5-wq:fix/1949-southern-hemisphere-dst
Nov 21, 2026
Merged

bitstorm merged 1 commit into
apache:masterfrom
teldigi5-wq:fix/1949-southern-hemisphere-dst

Conversation

@teldigi5-wq

Copy link
Copy Markdown
Contributor

Summary

Fixes #1949

This pull request corrects daylight-saving time (DST) offset detection in Apache Wicket's browser information collection.

Previously, wicket-browser-info.js assumed that January 1 always represented standard time and July 1 always represented daylight-saving time. That assumption fails in Southern Hemisphere timezones, where summer occurs around January.

Changes

  • Calculate UTC offsets for January 1 and July 1.
  • Use the smaller UTC offset for standard time (utcOffset) and the larger offset for daylight-saving time (utcDSTOffset), independent of hemisphere.
  • Preserve the behavior of timezones without DST.
  • Add QUnit regression tests for Northern Hemisphere, Southern Hemisphere, and fractional-hour DST offsets.
  • Register the new tests with Wicket's JavaScript test suite and lint configuration.

Regression test coverage

Timezone Scenario
Australia/Sydney Southern Hemisphere DST
America/New_York Northern Hemisphere DST
Asia/Colombo No DST
Australia/Lord_Howe 30-minute DST change

Validation

  • npx grunt jshint:core jshint:testsJs — passed (6 production files and 11 test files lint-free).
  • npx grunt connect qunit — passed:
    • Standard configuration: 219 tests, 0 failed, 0 skipped.
    • Vanilla configuration: 218 tests, 0 failed, 2 skipped.
  • Full Maven test suite not run.

Scope

Only browser timezone detection and its JavaScript regression test coverage are changed. No dependency upgrades are included.

@codecov-commenter

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 62.87%. Comparing base (193d9ef) to head (648c73d).
⚠️ Report is 2 commits behind head on master.

Additional details and impacted files
@@             Coverage Diff              @@
##             master    #1975      +/-   ##
============================================
+ Coverage     62.83%   62.87%   +0.03%     
- Complexity    11569    11574       +5     
============================================
  Files          1255     1255              
  Lines         48759    48759              
  Branches       6877     6877              
============================================
+ Hits          30640    30655      +15     
+ Misses        15427    15414      -13     
+ Partials       2692     2690       -2     
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@bitstorm
bitstorm merged commit 57f00f5 into apache:master Nov 21, 2026
5 of 6 checks passed
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.

Detect daylight saving time correctly in the southern hemisphere in browser info

3 participants