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

fixed "Unknown or bad timezone" issue #1522

Closed
wants to merge 2 commits into from

Conversation

emrysr
Copy link
Contributor

@emrysr emrysr commented Mar 2, 2020

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.

default_timezone = 'Europe/Paris'

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

stopped User\get_timezone() from returning false
User\get_timezone() now defaults to default_timezone
@TrystanLea
Copy link
Member

TrystanLea commented Mar 4, 2020

Thanks @emrys for the pointers to this problem. It's possible to get around this issue another way in the virtual feed engine itself by selecting the userid from the feeds table. I've committed a fix using this approach here:

See: ab04267

@TrystanLea TrystanLea closed this Mar 4, 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.

None yet

2 participants