How to have ZM use local time for timestamps, etc.

Forum for questions and support relating to the 1.24.x releases only.
Locked
pdanilchik
Posts: 8
Joined: Tue Jul 27, 2010 3:15 am

How to have ZM use local time for timestamps, etc.

Post by pdanilchik »

I would like to have timestamps and events tagged using my LOCAL TIME ZONE's time instead of GMT/UTC time. How is that accomplished?

I am using ZM 1.24.2 on Ubuntu 10.04 LTS Server and everything is working, for the most part, but when I just checked the local and UTC system time on the command line it gave this:

~$ date
Mon Jul 26 19:39:26 PDT 2010

~$ date -u
Tue Jul 27 02:39:29 UTC 2010


I am in the Pacific time zone (USA) so that part seems to be set up right.

When I monitor a camera, look at even time stamps, and replay triggered events, they all use the UTC time. Tried searching on this forum and elsewhere for the solution but I am giving up after a LOT of looking. Hopefully someone can make me feel stupid with the simple solution (it must be simple… right?).

Thanks kindly in advance.
User avatar
kingofkya
Posts: 1110
Joined: Mon Mar 26, 2007 6:07 am
Location: Las Vegas, Nevada

Post by kingofkya »

It compiled into the the zmc module so it can't be changed easil.
pdanilchik
Posts: 8
Joined: Tue Jul 27, 2010 3:15 am

time zone is hard coded? Really??

Post by pdanilchik »

So is it that EVERYONE using ZM is storing UTC time and timestamping with it? Somehow that seems hard to believe but I suppose that is possible.

I'll take a look at that code and see what you mean. Hopefully it is easy to figure out and not nebulous with regard to timestamp related functionality. Personally, I don't rule out editing the source and recompiling to get what I want... but it seems ideally like this should be something that is configurable. I'll contribute back if I get down the road with it and can make it general.

Any insight on why I wouldn't want to attempt this would be appreciated. Possibly at this point I am not considering database related stuff... of which I have limited understanding at this time.
bb99
Posts: 943
Joined: Wed Apr 02, 2008 12:04 am

Post by bb99 »

Absolutely not! The rest of us that want a local time stamp are setting our system clocks to local and unticking the option to use GMT as our default and with me stopping the NTP updates all together (my ZM box can't access the internet period!). ZM apparently uses the system clock, uncorrected where OS treats it differently.
pdanilchik
Posts: 8
Joined: Tue Jul 27, 2010 3:15 am

Post by pdanilchik »

Thanks for that. I actually thought about doing that: set the system clock to my local time and skip having it corrected.

I am connected to the internet and don't care too much about time drift so that might be a good way for me to go. Still, it seems like an option in ZM might be worth investigating so I may do so.

Thanks for the clarification. At least I now know that it isn't just some setting in ZM that I am overlooking.
bb99
Posts: 943
Joined: Wed Apr 02, 2008 12:04 am

Post by bb99 »

This would make an excellent feature request! The option to use either and still be able to use time updates but could you image the distro. problems; dang!
User avatar
kingofkya
Posts: 1110
Joined: Mon Mar 26, 2007 6:07 am
Location: Las Vegas, Nevada

Post by kingofkya »

Ok sorry i miss read i though you ment make it 12 instead of 24 hour clock.
Locked