Hour events column at 0

Add any particular hints or tricks you have found to help with your ZoneMinder experience.
Post Reply
bjoyce
Posts: 14
Joined: Mon Mar 13, 2006 5:03 am

Hour events column at 0

Post by bjoyce »

Hi,
Everything is working, :D

The only problem is the hour events column is allways zero.
:?:

All these events are in the last 3 hours. If I wait a few days the days column resets but not the hours.

nothing obvious to me in the logs. Here is a screenshot


Image

Any ideas what could cause this?
Last edited by bjoyce on Thu Nov 06, 2008 8:45 pm, edited 1 time in total.
User avatar
cordel
Posts: 5210
Joined: Fri Mar 05, 2004 4:47 pm
Location: /USA/Washington/Seattle

Post by cordel »

Most likely the database has gotten corrupted and needs to be repaired.
Check the FAQ in the wiki on how to determine this and repair it if necessary.
bjoyce
Posts: 14
Joined: Mon Mar 13, 2006 5:03 am

Post by bjoyce »

cordel wrote:Most likely the database has gotten corrupted and needs to be repaired.
Check the FAQ in the wiki on how to determine this and repair it if necessary.
Thanks for the reply,
OK, I did the following command for checking the database but all seems OK on that front, anything else I can check?

How do I repair the MySQL Database?

There is two ways to go about this. In most cases you can run from the command prompt ->

* mysqlcheck --all-databases --auto-repair -pyour_database_password -u your_databse_user


and got the following results
---
mysql.columns_priv OK
mysql.db OK
mysql.func OK
mysql.help_category OK
mysql.help_keyword OK
mysql.help_relation OK
mysql.help_topic OK
mysql.host OK
mysql.proc OK
mysql.procs_priv OK
mysql.tables_priv OK
mysql.time_zone OK
mysql.time_zone_leap_second OK
mysql.time_zone_name OK
mysql.time_zone_transition OK
mysql.time_zone_transition_type OK
mysql.user OK
zm.Config OK
zm.ControlPresets OK
zm.Controls OK
zm.Devices OK
zm.Events OK
zm.Filters OK
zm.Frames OK
zm.Groups OK
zm.MonitorPresets OK
zm.Monitors OK
zm.States OK
zm.Stats OK
zm.TriggersX10 OK
zm.Users OK
zm.ZonePresets OK
zm.Zones OK
Eklectick
Posts: 127
Joined: Sat Nov 20, 2004 1:12 am

Post by Eklectick »

Hi

This creeped me out too a few days ago... my problem was with the daylight time change.

If you log into your box via prompt and give it a date command, is the time via prompt the same time reflected on the console?

Regards!
bjoyce
Posts: 14
Joined: Mon Mar 13, 2006 5:03 am

Post by bjoyce »

Bingo :D

the time did not match between system clock and zoneminder console. When i set the system clock to the proper time (it was runnung 56minutes fast) all was fixed.

Thanks

one question thou, how come the time in the console was correct and system time different?

Answer to this was "refresh your console dummy, time is updated then"
Last edited by bjoyce on Thu Nov 06, 2008 8:47 pm, edited 1 time in total.
Eklectick
Posts: 127
Joined: Sat Nov 20, 2004 1:12 am

Post by Eklectick »

It is good you could fix it just by changing de time... to me that didnt do the trick, although the time via prompt was changed and issueing a date command did report the correct time on prompt, the console was still a full hour ahead.

A friend of mine who had seen something similar and after seeing the console, told me that php was the culprit. We edited /etc/php.ini this way:

On the line:
[Date]
; Defines the default timezone used by the date functions
; date.timezone = <---- OLD

Changed to:
; Defines the default timezone used by the date functions
date.timezone = "US/Central" <---- NEW

Save php.ini and via prompt issue:
service httpd restart

After this, refresh console and time and hour appeard correct.

Regards!
bjoyce
Posts: 14
Joined: Mon Mar 13, 2006 5:03 am

Post by bjoyce »

Sorry, i must have been mistaken, when i checked zm just now my time was wrong again and an hour out.

I followed your instrutions and time is normal again.

dont know what is happening. Suspect it is my time zone

[Australia/Brisbane]

As it does not have daylight saving.
User avatar
cordel
Posts: 5210
Joined: Fri Mar 05, 2004 4:47 pm
Location: /USA/Washington/Seattle

Post by cordel »

Maybe this will help:
http://us2.php.net/timezones

Explains how to update php's TZ DB:
http://www.electrictoolbox.com/correct-php-timezone/
Post Reply