Bugfix: Timestamp label format

Support and queries relating to all previous versions of ZoneMinder
Locked
User avatar
ammaross
Posts: 61
Joined: Mon Mar 12, 2007 8:34 pm
Location: Utah, USA

Bugfix: Timestamp label format

Post by ammaross »

The default Timestamp -> Timestamp Label Format for new monitors is still using the old 1.22.3- style.

The fix:
in zm_html_view_monitor.php, on line 70: (may vary depending if you mod your code)
Change the line from this:

Code: Select all

$monitor['LabelFormat'] = '%%s - %y/%m/%d %H:%M:%S';
To this:

Code: Select all

$monitor['LabelFormat'] = '%N - %y/%m/%d %H:%M:%S';
User avatar
zoneminder
Site Admin
Posts: 5215
Joined: Wed Jul 09, 2003 2:07 pm
Location: Bristol, UK
Contact:

Post by zoneminder »

Thanks for that. Now fixed.
Phil
kevin_robson
Posts: 247
Joined: Sun Jan 16, 2005 11:26 am

Post by kevin_robson »

I just installed RC2 and the default timestamp still seems to start with %%s

The fix suggested works fine but thought I'd mention it.
User avatar
zoneminder
Site Admin
Posts: 5215
Joined: Wed Jul 09, 2003 2:07 pm
Location: Bristol, UK
Contact:

Post by zoneminder »

I can't find any instances of %%s anywhere. Can you tell me where you found it and/or what you did?

I did find a mistake in the defaults in the DB files where it set the format to have a %f instead of a %N and have fixed that but can't see anything else wrong in that area.
Phil
User avatar
zoneminder
Site Admin
Posts: 5215
Joined: Wed Jul 09, 2003 2:07 pm
Location: Bristol, UK
Contact:

Post by zoneminder »

Actually I think may have I just fixed it here and didn't upload it yet.
Phil
User avatar
ammaross
Posts: 61
Joined: Mon Mar 12, 2007 8:34 pm
Location: Utah, USA

Post by ammaross »

Just to clarify, the database thing Phil mentions is the default value for Monitors -> LabelFormat column in the zm database. Just change the %f to a %N using your favorite MySQL editor (phpmyadmin or webmin are my personal favorites) and you'll be fine. (the fix above overrides that default value anyway, but never hurts to be on the safe side).
kevin_robson
Posts: 247
Joined: Sun Jan 16, 2005 11:26 am

Post by kevin_robson »

"I can't find any instances of %%s anywhere. Can you tell me where you found it and/or what you did? "

Sounds like you have found it now but to confirm it is present in the default setting for timestamp when creating a new monitor.
Locked