fixed "Unknown or bad timezone" issue #1522
Closed
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.
see:
https://community.openenergymonitor.org/t/dashboard-loggedin-vs-public/11626/31
added User\default_timezone
stopped User\get_timezone() from returning false
User\get_timezone() now defaults to default_timezone
the requests for dashboards don't currently include a guest user's timezone. Only logged in users can specify a timezone (set in their account page)
using this pull request you can add a default timezone to your settings file. eg.
not currently set in the default-settings file needs testing with different setups first
must be a value supported by PHP: https://www.php.net/manual/en/timezones.europe.php
and the time calculations will use this offset instead of UTC
https://github.com/emrysr/emoncms/blob/c68e9ff887376c85dce1f2984079cc4f166b4196/Modules/process/process_model.php#L30-L49