Changing timezone breaks old events

Forum for questions and support relating to the 1.29.x releases only.
Locked
johnncx
Posts: 4
Joined: Tue Sep 27, 2011 10:55 am

Changing timezone breaks old events

Post by johnncx »

Hi,
I noticed that the time was wrong on my debian machine following the switch to british summer time.

I checked the current timezone:

Code: Select all

cctv events # cat /etc/timezone
Europe/London

which seemed correct. 

cctv events # dpkg-reconfigure tzdata

Current default time zone: 'Europe/London'
Local time is now:      Thu Mar 31 15:20:53 BST 2016.
Universal Time is now:  Thu Mar 31 14:20:53 UTC 2016.

cctv events # cat /etc/timezone
Europe/London
Not really sure what debian is doing there, but ok..

Now with a correct time on my server, Zoneminder however now won't play old events:

I tried to view an event with timestamp of 03/29 15:37:00
and get an error:
Can't open /usr/share/zoneminder/events/6/16/03/29/16/37/00/001-capture.jpg: No such file or directory

Note it seems to be out by one hour. This also affects much olders events from August last year.

PHP already had its timezone to set to Europe/London. This seems like a bug. Any idea how can I fix this?

Cheers,

john
johnncx
Posts: 4
Joined: Tue Sep 27, 2011 10:55 am

Re: Changing timezone breaks old events

Post by johnncx »

I believe I have found the issue.. MySQL only updates its timezone at startup so upon restarting mysql, the timezone data for old events now works fine. Although I think they are messed up from since I fixed the server time last week by setting the timezone correctly on the machine, and since I have just restarted mysql, but I guess I'll have to live with that.

Moral of the story, if you change the server timezone, make sure you also restart mysql (or perhaps just reboot incase there are other services that have the same issue).

Thanks,

John
Locked