Skip to content

Conversation

@nomis52
Copy link
Contributor

@nomis52 nomis52 commented Jan 5, 2026

Western Australia doesn't currently have DST - it was trialed in the past and abandoned

Summary by CodeRabbit

Release Notes

  • New Features
    • Added AWST (Perth) timezone option to the Time setup selector.

✏️ Tip: You can customize this high-level summary in your review settings.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Jan 5, 2026

Walkthrough

This change adds support for Australian Western Standard Time (AWST, Perth timezone) by introducing a new timezone definition with UTC+8 offset and no daylight saving time, alongside corresponding UI updates to the timezone selector.

Changes

Cohort / File(s) Summary
Timezone Addition for AWST (Perth)
wled00/data/settings_time.htm
Added new timezone option AWST (Perth) with value 24 to the Time setup timezone selector element
Timezone Addition for AWST (Perth)
wled00/ntp.cpp
Added TZ_AUSTRALIA_WESTERN macro definition with value 24, incremented TZ_COUNT from 24 to 25, and appended new TZ_TABLE entry for AWST with UTC+8 offset and no DST rules

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Pre-merge checks and finishing touches

✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title 'Add support for Australian Western Time' directly and clearly describes the main change: adding a new timezone option (AWST/TZ_AUSTRALIA_WESTERN) to the codebase.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
✨ Finishing touches
  • 📝 Generate docstrings

📜 Recent review details

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between e95450b and 407c9fd.

📒 Files selected for processing (2)
  • wled00/data/settings_time.htm
  • wled00/ntp.cpp
🧰 Additional context used
📓 Path-based instructions (4)
wled00/data/**/*.{htm,html,css,js}

📄 CodeRabbit inference engine (.github/copilot-instructions.md)

Use tabs for indentation in web files (.htm/.html/.css/.js) under wled00/data

Files:

  • wled00/data/settings_time.htm
wled00/data/**

📄 CodeRabbit inference engine (.github/copilot-instructions.md)

wled00/data/**: When modifying web UI files, run npm run build to regenerate embedded headers before any firmware build
For web UI changes, edit files only under wled00/data (not firmware or generated files)

Files:

  • wled00/data/settings_time.htm
wled00/data/settings*.htm

📄 CodeRabbit inference engine (.github/copilot-instructions.md)

Name settings pages as settings*.htm within the web UI

Files:

  • wled00/data/settings_time.htm
wled00/**/*.cpp

📄 CodeRabbit inference engine (.github/copilot-instructions.md)

Use 2-space indentation for C++ source files (.cpp)

Files:

  • wled00/ntp.cpp
🔇 Additional comments (3)
wled00/ntp.cpp (2)

40-42: LGTM - Macro definitions are correct.

The new timezone constant and count update are properly defined and consistent with the array structure.


144-148: LGTM - Timezone definition is correct.

The TZ_TABLE entry correctly implements AWST (UTC+8, no DST) with:

  • Proper offset calculation (480 minutes = 8 hours)
  • Identical daylight and standard rules (no DST transitions)
  • Correct C++ array syntax (trailing comma added to previous entry)
wled00/data/settings_time.htm (1)

168-168: LGTM - Timezone option added correctly.

The option value (24) correctly matches TZ_AUSTRALIA_WESTERN from ntp.cpp, and the label follows the established pattern.

As per coding guidelines, ensure you run npm run build to regenerate embedded headers before any firmware build.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@DedeHai
Copy link
Collaborator

DedeHai commented Jan 5, 2026

thanks, this seems pretty straight forward.
got a link to that previous attempt you mentioned?

@nomis52
Copy link
Contributor Author

nomis52 commented Jan 5, 2026

https://en.wikipedia.org/wiki/2009_Western_Australian_daylight_saving_referendum

After a 3 yr trial it was put to a compulsory referendum in 2009 and rejected 55% to 45%. The Premier at the time declared "it should not be considered for another 20 years".

@DedeHai
Copy link
Collaborator

DedeHai commented Jan 5, 2026

ah, I thought you meant an attempt in adding this code :)

@netmindz netmindz merged commit 22ab62d into wled:main Jan 7, 2026
23 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.

3 participants