I want the event list to show local time, not UTC.
Complaints about this seem to go back to 2006, and apparently the problem must not impress the developers since it seems to have been pretty much ignored.
There is a config option for system time zone (TIMEZONE) which apparently does not affect the event list display.
Semantically, just from a common-sense point of view, I am not trying to change the system time, I am trying to alter the display time zone. I'm not sure what TIMEZONE does, but it is set to my local zone, and isn't fixing the problem. I assume that TIMEZONE was what was set when I installed and specified my time zone as PST/PDT.
Looking over the history of this problem on multiple forums I have found:
1) In desperation some folks have taken to setting the zone in /etc/php/8.2/apache2/php.ini - sadly this changes the zone for every php program running on this server under Apache. I don't want to change the environment on all programs. And I don't want this setting to be lost if Apache upgrades to, e.g., 8.3. This is the wrong way to control Zoneminder IMHO.
2) One person changed the database time zone in mysql. This also seems to me to be a huge mistake - I don't want to change the database system parameters, and I don't even want to change the format of dates/times stored in a database - I just want to specify the display format. Hopefully the database has integers representing the number of seconds in the epoch which is a zone independent integer.
It appears that I need to file a feature request, but I'm not sure whether there is some opposition to getting this right. Or is this a bug because TIMEZONE should do this?
Comments?
Time Zone used in Event List
Re: Time Zone used in Event List
My only comment is that I've been using ZM for quite a while now, and not come across this problem. All of my events have a timestamp in the event list of "local time". As you say, that make sense from a human-interaction perspective.
I'm in the UK so system is set up for "Europe/London" which flips from UTC to UTC+1 (or GMT/BST) and everything seems to work as it should.
Maybe this is because I had my timezone configured correctly on the system, and in Apache, before ZM got installed -- and it "just worked". I don't recall having to fix anything to correct misbehaviour as you describe.
Maybe it only affects a certain subset of users/setups, which is why it's low priority to fix. Or indeed, is working correctly -- just misconfigured?
I'm in the UK so system is set up for "Europe/London" which flips from UTC to UTC+1 (or GMT/BST) and everything seems to work as it should.
Maybe this is because I had my timezone configured correctly on the system, and in Apache, before ZM got installed -- and it "just worked". I don't recall having to fix anything to correct misbehaviour as you describe.
Maybe it only affects a certain subset of users/setups, which is why it's low priority to fix. Or indeed, is working correctly -- just misconfigured?
-
- Posts: 1322
- Joined: Sat Aug 31, 2019 7:35 am
- Location: San Diego
Re: Time Zone used in Event List
Echo what mikb said, except I use Time zone: America/Tijuana (PDT, -0700)
Could you post the result of timedatectl and a snapshot of an event list?
Could you post the result of timedatectl and a snapshot of an event list?
-
- Posts: 6
- Joined: Fri Mar 29, 2024 8:48 pm
Re: Time Zone used in Event List
I would love to get an answer to this as well. I have the same problem and have had 0 luck fixing it.
Here is the terminal output from timedatectl
Local time: Sat 2024-05-04 09:33:57 EDT
Universal time: Sat 2024-05-04 13:33:57 UTC
RTC time: Sat 2024-05-04 13:33:57
Time zone: US/Eastern (EDT, -0400)
System clock synchronized: yes
NTP service: active
RTC in local TZ: no
I also attached a screen shot of my event log. (My events also don't close for some reason, its set to continuous record which kind of works)
Here is the terminal output from timedatectl
Local time: Sat 2024-05-04 09:33:57 EDT
Universal time: Sat 2024-05-04 13:33:57 UTC
RTC time: Sat 2024-05-04 13:33:57
Time zone: US/Eastern (EDT, -0400)
System clock synchronized: yes
NTP service: active
RTC in local TZ: no
I also attached a screen shot of my event log. (My events also don't close for some reason, its set to continuous record which kind of works)
- Attachments
-
- Screenshot 2024-05-04 093542.png (139.15 KiB) Viewed 1271 times
-
- Posts: 1322
- Joined: Sat Aug 31, 2019 7:35 am
- Location: San Diego
Re: Time Zone used in Event List
Hmm.
What does your (ubuntu/linux) System->Settings->Date & Time page look like?
I'm pretty sure "US/Eastern" is not valid. Probably should be New York, United States
What does your (ubuntu/linux) System->Settings->Date & Time page look like?
I'm pretty sure "US/Eastern" is not valid. Probably should be New York, United States
-
- Posts: 6
- Joined: Fri Mar 29, 2024 8:48 pm
Re: Time Zone used in Event List
You are correct it says "EDT (New York, United States)" How do I fix it in ZM to match that?
Currently under ZM/options/System Time zone is set to New York, United States
Currently under ZM/options/System Time zone is set to New York, United States
-
- Posts: 1322
- Joined: Sat Aug 31, 2019 7:35 am
- Location: San Diego
Re: Time Zone used in Event List
See if
sudo timedatectl set-timezone America/New_York
helps.
Having messed with it here, not sure it'll help, but shouldn't hurt, either.
sudo timedatectl set-timezone America/New_York
helps.
Having messed with it here, not sure it'll help, but shouldn't hurt, either.
-
- Posts: 6
- Joined: Fri Mar 29, 2024 8:48 pm
Re: Time Zone used in Event List
That didn't work but did get me pointed in the correct direction.
I found this documentation that didn't work.
https://zoneminder.readthedocs.io/en/st ... ebian.html
I had to change sudo nano /etc/php/7.0/apache2/php.ini
to sudo nano /etc/php/8.2/apache2/php.ini
Then find and update the time zone in the php.ini file as described in the documentation.
Then do
sudo systemctl reload apache2
sudo systemctl restart zoneminder
I found this documentation that didn't work.
https://zoneminder.readthedocs.io/en/st ... ebian.html
I had to change sudo nano /etc/php/7.0/apache2/php.ini
to sudo nano /etc/php/8.2/apache2/php.ini
Then find and update the time zone in the php.ini file as described in the documentation.
Then do
sudo systemctl reload apache2
sudo systemctl restart zoneminder
-
- Posts: 1322
- Joined: Sat Aug 31, 2019 7:35 am
- Location: San Diego
Re: Time Zone used in Event List
Excellent. Good work! Leaves alwhaley's problem, unfortunately. Apparently, he needs UTC.