Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Removed call to adjustTime() between calls to setTime() and hour(). #16

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

levinedl
Copy link

This fixes occasional failure to reflect time zone (HoursOffset)
after updating the time from GPS. The Time library contains a
refreshCache() function that updates the cache only if the time
has changed since the last cache update.

adjustTime does not call refreshCache(). hour() does call it, with
the current time. If the current time is the same as the cached time
from the setTime() call, then the cache of tm is not updated to reflect
the adjustTime() call. Then, the timezone adjustment is ignored.

This fixes occasional failure to reflect time zone (HoursOffset)
after updating the time from GPS.  The Time library contains a
refreshCache() function that updates the cache only if the time
has changed since the last cache update.

adjustTime does not call refreshCache().  hour() does call it, with
the current time.  If the current time is the same as the cached time
from the setTime() call, then the cache of tm is not updated to reflect
the adjustTime() call.  Then, the timezone adjustment is ignored.
@levinedl levinedl closed this Apr 26, 2020
@levinedl levinedl reopened this Apr 26, 2020
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.

1 participant