Unit and timezone handling - #330
Merged
Merged
Conversation
Collaborator
StatusSuccess. Tested with a schedule for target range. The new code reports the scheduled value based on Looper's phone not the LoopFollow phone. Configuration:
TestLoopFollow
|
marionbarker
approved these changes
Oct 16, 2024
MtlPhil
pushed a commit
to achkars-org/LoopFollow
that referenced
this pull request
Mar 7, 2026
Unit and timezone handling
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.
Summary of Changes:
This Pull Request introduces two main changes:
Use Units from the Profile Store Instead of the Top-Level Units
Description:
store.units) can differ from the units specified at the main level (profileData.units) when using Loop.store.units) when loading profile data.Implementation Details:
loadProfilefunction to sourceself.unitsfromstore.unitsinstead ofprofileData.units.unitsproperty to theNSProfile.Storestruct to facilitate this change.Future Considerations:
Time Zone Support for Profile Data Based on Looper's Time Zone
Description:
store.timezone) when determining the current profile data.Implementation Details:
getCurrentValuefunction to use the profile's time zone instead of the device's local time.getTimeZone(from:)to handle various time zone formats and parse them intoTimeZoneobjects.TimeZoneobject in theProfileManagerto avoid re-evaluating it on each call, improving performance.Time Zone Format Handling:
"Europe/Stockholm"and"Etc/GMT-2"."ETC/GMT-2"by normalizing them to standard IANA time zone identifiers.Thanks to Odd Stoltenberg for reporting these two issues.