Page 1 of 1

Bugfix: Timestamp label format

Posted: Mon Nov 12, 2007 7:47 pm
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';

Posted: Tue Nov 13, 2007 12:42 pm
by zoneminder
Thanks for that. Now fixed.

Posted: Sat Nov 17, 2007 2:46 pm
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.

Posted: Sun Nov 18, 2007 12:23 pm
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.

Posted: Sun Nov 18, 2007 12:39 pm
by zoneminder
Actually I think may have I just fixed it here and didn't upload it yet.

Posted: Mon Nov 19, 2007 4:37 am
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).

Posted: Fri Nov 23, 2007 7:39 am
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.