Repository navigation
Fix timezone offset formatting in device timestamps - #2664
Open
Firat17aze wants to merge 2 commits into
Open
Firat17aze wants to merge 2 commits into
Firat17aze wants to merge 2 commits into
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
A device configured for UTC-05:00 currently produces a timestamp ending in
+0-5:00. Negative fractional offsets also retain negative hour/minute components, and values of 9 omit the leading zero. These strings appear in the device time, scheduler and WebSocket output.Choose the sign from the complete offset, format its absolute hours/minutes, and pad values below 10. Add 12 explicit public formatter cases, including negative, fractional, single-digit and cross-midnight offsets.
Validation: the new regression fails on the original source. 13 of 14 CTest suites pass with AddressSanitizer, including the new datetime suite. The unchanged Tuya suite reports a container-overflow at
tuya_transport.h:184, also reproduced with the original datetime source. The fetched Arduino mock dependency needed local-only adaptations for macOS ARM (inert interrupt getters and a weak function in place of an ELF alias); these are excluded from this PR. A full NodeMCU Lolin ESP8266 firmware build passes on espressif8266 4.2.1. No physical hardware tested.LLMs were used for review and code generation in some parts of this pull request.