-
-
Notifications
You must be signed in to change notification settings - Fork 47
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
timezone issue #103
Comments
Can you try and set Line 300 in dea3416
0 to see what happens in the frontend?
|
If I set it to zero, there's no difference. If I set it to -8 then the
graph appears on local time since that's the offset from GMT.
…On Thu, Mar 7, 2024 at 1:45 AM Michael Bolli ***@***.***> wrote:
Can you try and set
https://github.com/mbolli/nfsen-ng/blob/dea341695c4731076553798f1fdccf2ff50f2c33/backend/api/Api.php#L300
to 0 to see what happens in the frontend?
—
Reply to this email directly, view it on GitHub
<#103 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AFU4CSRMYVPNE3FDGTIJCZLYXALI7AVCNFSM6AAAAABEKKGXM2VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSOBSG44DGOJTHE>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
Same issue, i was 2 hours in the past (for graphs, statistics…).
I solved this by modifying php.ini just as suggested by @mlcarson :
[Date]
; https://www.php.net/manual/en/timezones.php
date.timezone = Europe/Paris
sudo systemctl restart php-fpm.service
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
My server is in America/Los_Angeles timezone and is running the latest version of Debian stable. My nfcapd data files are getting the time/date correct. The nfsen-ng v0.3 is using UTC for the frontend graphs. It graphs the data in the correct spot but the current time is being taken from UTC so when I choose the 1 hour option, it'll show nothing because I'm 8 hrs in the future.
I've modified the /etc/php/8.2/apache2/php.ini file so that date.time is set to 'America/Los_Angeles' and restarted the apache2 server. I've also restarted the entire OS and no difference.
BTW, PHP 8.2 is the latest offered by Debian stable so I'm using that rather than 8.3 since 8.2 seemed to still be the minimum supported.
Well, I somehow "solved" this. The graphs are now just showing in UTC time (not exactly what I wanted) but the data is also mapped to UTC so when the last hour of data is shown it's now accurate. This might have been an issue with the /etc/php/8.2/cli/php.ini file. I modified that but hadn't restarted the cli.php daemon so maybe that was it...
So I guess the next question would be -- is there a way of displaying the graphs in the server's local timezone rather than UTC?
The text was updated successfully, but these errors were encountered: