Zoneminder 1.36 daylight saving time

Discussions related to the 1.36.x series of ZoneMinder
Post Reply
bosun
Posts: 13
Joined: Fri Jan 12, 2024 5:24 pm

Zoneminder 1.36 daylight saving time

Post by bosun »

For a couple of months I have been running Zoneminder with 6 cameras on my home network in the UK in an Ubuntu VM ontop of a Proxmox VE hypervisor. Together with over 70 countries the UK uses a daylight saving time system (DST), locally referred to as British Summer Time (BST). I display the timestamp on all the videos. Since the UK clocks added an hour, from 1am to 2am, on 31/04/2024 all my camera timestamps are 1 hour behind UK time. I would like to make future recordings display UK time.

I understand that systems that record things with timestamps and that also change time twice a year have great complexity dealing with this issue. But I cannot find out how Zoneminder deals with this. Searching the Zoneminder documentation, the Zoneminder forums and googling 'Zoneminder 1.36 daylight saving time' does not provide me with a clear understanding of what I should do to make future camera timestamps display correctly in a country that uses DST.

I set up my system using the defaults and do not know how to tweak under the hood settings.

Current time settings:

Proxmox 8.1: time system using BST
Ubuntu 22.04 LTS: time system using UTC, currently 1 hour behind UK BST (DST)
Zoneminder 1.36.33: time within Options > System > TIMEZONE set to 'Unset- use value in php.ini', and time within the log system display indicates UTC.

Questions:
1. Does Zoneminder support DST?
2. Am I missing some obvious setting withing the Zoneminder web interface?
3. Can I simply tweak the display timestamp for each camera to show the correct UK time twice a year?
4. Can I tweak my current settings within Ubuntu and/or Zoneminder to convert my system to support DST?
5. If I completely rebuilt from scratch my Ubuntu VM and Zoneminder installation with different time settings would I then be able to support DST?

Thank you for reading this far.
mikb
Posts: 604
Joined: Mon Mar 25, 2013 12:34 pm

Re: Zoneminder 1.36 daylight saving time

Post by mikb »

bosun wrote: Fri Apr 05, 2024 11:20 am
Current time settings:

Ubuntu 22.04 LTS: time system using UTC, currently 1 hour behind UK BST (DST)
Zoneminder 1.36.33: time within Options > System > TIMEZONE set to 'Unset- use value in php.ini', and time within the log system display indicates UTC.
My gut reaction is the two lines above are the answer. You've got exactly what you asked for (but it's not what you wanted) :)

UTC does not change back and forth and is the worldwide reference. It's always the same as GMT+0 (effectively, leap seconds and nitpicking aside)

You need to set the timezone so that you are using the TZ equivalent of "UK, London" which will invoke a timezone file with all the discontinuity listed for GMT->BST and BST->GMT from 19XX to 20XX.

Start with getting the Ubuntu environment correct, so that "date" shows e.g. Fri 5 Apr 18:41:22 *BST* 2024 (rather than, I guess, UTC as the moment). Then check the php side of things if there is still a problem.

Code: Select all

$ cat /etc/timezone 
Europe/London

$ timedatectl
               Local time: Fri 2024-04-05 18:43:40 BST <----- *** HERE
           Universal time: Fri 2024-04-05 17:43:40 UTC
                 RTC time: Fri 2024-04-05 17:43:40
                Time zone: Europe/London (BST, +0100) <---- *** HERE
System clock synchronized: yes
              NTP service: active
          RTC in local TZ: no
To fix, try

Code: Select all

 sudo timedatectl set-timezone Europe/London
 
bosun
Posts: 13
Joined: Fri Jan 12, 2024 5:24 pm

Re: Zoneminder 1.36 daylight saving time

Post by bosun »

Changing the time in Ubuntu and then through the Zoneminder web interface worked perfectly. Thank you.
mikb
Posts: 604
Joined: Mon Mar 25, 2013 12:34 pm

Re: Zoneminder 1.36 daylight saving time

Post by mikb »

bosun wrote: Sat Apr 06, 2024 8:34 am Changing the time in Ubuntu and then through the Zoneminder web interface worked perfectly. Thank you.
Good to hear. Timezone changes are always a bit of a nuisance! UTC has the advantage of logs etc. always increasing in time, whereas a missing hour (spring) and a duplicate hour (autumn) can cause problems with processing logs, interleaving of files under file-naming conventions for YYYYMMDD-hhmmss.avi formats etc.
dougmccrary
Posts: 1216
Joined: Sat Aug 31, 2019 7:35 am
Location: San Diego

Re: Zoneminder 1.36 daylight saving time

Post by dougmccrary »

U.S. WWV time uses a bit to indicate whether daylight time is in effect. Ideally, that would be included with the time stamp, but I guess it's too late now.
Post Reply