View unanswered posts | View active topics It is currently Tue Oct 21, 2014 6:17 am



Reply to topic  [ 5 posts ] 
Setting computer clock to UTC = problem! (SOLVED) 
Author Message
User avatar

Joined: Wed Dec 05, 2007 11:57 am
Posts: 64
Location: Lisbon
Post Setting computer clock to UTC = problem! (SOLVED)
Hello!

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 1:17 am, edited 1 time in total.



Wed Dec 05, 2007 12:57 pm
Profile

Joined: Thu Oct 11, 2007 6:10 am
Posts: 186
Post 
There's a note here:

http://www.wikihow.com/Change-the-Timezone-in-Linux

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 ubuntuforums.org (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.


Wed Dec 05, 2007 5:51 pm
Profile

Joined: Mon Sep 05, 2005 6:06 am
Posts: 25
Location: Townsville/Queensland/Australia
Post 
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

Regards,

Troy.


Wed Dec 12, 2007 1:31 pm
Profile WWW
User avatar

Joined: Wed Dec 05, 2007 11:57 am
Posts: 64
Location: Lisbon
Post 
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.

Thanks.


Mon Dec 24, 2007 12:13 am
Profile
User avatar

Joined: Wed Dec 05, 2007 11:57 am
Posts: 64
Location: Lisbon
Post 
Hello!

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.


Wed Feb 06, 2008 11:20 pm
Profile
Display posts from previous:  Sort by  
Reply to topic   [ 5 posts ] 

Who is online

Users browsing this forum: No registered users and 0 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group