Setting computer clock to UTC = problem! (SOLVED)

Support and queries relating to all previous versions of ZoneMinder

Moderator: zoneminder

User avatar
Posts: 64
Joined: Wed Dec 05, 2007 10:57 am
Location: Lisbon

Setting computer clock to UTC = problem! (SOLVED)

Postby caladeira » Wed Dec 05, 2007 11:57 am


I'm using zoneminder for about 3 months now, and I�ve detected a small bug that has some impact on the user interface.

I�m using Ubuntu 7.10 server with zoneminder 1.22.3 installed from zoneminder_1.22.3-8_i386.deb, running ntp to adjust time.

When I�ve installed ubuntu, I�ve set the system clock to UTC as advised in most ubuntu setup guides.
However, since I�m in Portugal, my real time is UTC-1.

As a result of this setting (I think) the time information in the main zoneminder page is always in advance 1 hour (in the upper left corner).

The total for events by hour is always 0.
If I click on one of this �0�, I�ll get an empty list; however, if I change the filter from -1 hour to -2 hour, I�ll get the list of events from the last hour.

Besides this, all clock information is correct across all events.

Do I have to change the ubuntu clock setting to local time instead of UTC?
How can I do this after the system is installed?

I appreciate if anyone can give me a clue to solve this issue.

Best regards,
Carlos Ladeira
Last edited by caladeira on Thu Feb 07, 2008 12:17 am, edited 1 time in total.

Posts: 186
Joined: Thu Oct 11, 2007 5:10 am

Postby haus » Wed Dec 05, 2007 4:51 pm

There's a note here:

that "Some applications (such as PHP) have separate timezone settings from the system timezone". Maybe that is what's at work here? I'm not sure how old that document is, though, vs. ubuntu 7.10.

From (a fantastic resource):

sudo tzconfig

This supposedly allows you to change timezone settings. That's an interesting issue you've found. Implementing time zones on servers can be a bit complex because different people (and programs) expect different things. There's a perfectly valid argument for setting your server clock to UTC and then relying on programs to make the calculation of what time zone you are in, but personally, on a standalone ZM box I would just set the system time as the local time and be done with it.

Posts: 25
Joined: Mon Sep 05, 2005 5:06 am
Location: Townsville/Queensland/Australia

Postby KegRaider » Wed Dec 12, 2007 12:31 pm

hi Caladeira,

have you found a solution yet? I have the same issue with my interface, yet, I have set my hwclock and system clock to the same, local time.

I have checked the wiki posted above, but still doesn't help i'm afraid. I think from what I read in the page, that PHP has a separate timezone which I'm yet to find.

I'm using the Mandriva LiveCD 1.22.3



User avatar
Posts: 64
Joined: Wed Dec 05, 2007 10:57 am
Location: Lisbon

Postby caladeira » Sun Dec 23, 2007 11:13 pm

Hi there!

I'm sorry but I've been away for some time.

This problem seams to be related with a bug in php.

If I find something, I'll post here.


User avatar
Posts: 64
Joined: Wed Dec 05, 2007 10:57 am
Location: Lisbon

Postby caladeira » Wed Feb 06, 2008 10:20 pm


I've found a better way to correct this php problem related with the local time.

To fix it, edit the file "/etc/php5/apache2/php.ini", uncomment and set the line "date.timezone" to your time zone.

In my case I set this way:

date.timezone = Europe/Lisbon

Hope it help.

Return to “ZoneMinder Previous Versions”

Who is online

Users browsing this forum: Yahoo [Bot] and 0 guests