Page 1 of 1
What controls the log file time format ?
Posted: Sun Feb 26, 2017 10:37 pm
by chevelle67
I was wondering what is controlling the log file time format seen here in my attached image of the /var/log/messages? I would like to change this to 12 hour time if possible.
Re: What controls the log file time format ?
Posted: Mon Feb 27, 2017 11:34 am
by SteveGilvarry
Don't think there is an easy way, in fact not even sure if this field has any alternative format. A number of formats defined here.
https://github.com/ZoneMinder/ZoneMinde ... s/lang.php
But they can be overridden using the language file, check fr or hu in here for some examples of how to do that and try define an alternative in your language file (en_gb.php is English). These all live in the www folder of your zm install.
https://github.com/ZoneMinder/ZoneMinde ... r/web/lang
And the key for the codes.
http://php.net/manual/en/function.date.php
Let me know if it works, or if you need help hunting down why it doesn't work. I don't work on the PHP side much and this ajax log update even less so.
Re: What controls the log file time format ?
Posted: Tue Feb 28, 2017 12:06 am
by chevelle67
Thanks for the info! I have done some basic code tweaking before and I kinda like PHP so this might be a fun task. I will keep you posted, may take me some time probably this weekend before I get a chance to do any real testing.
Re: What controls the log file time format ?
Posted: Sun Mar 05, 2017 10:56 pm
by chevelle67
Update: My plan was to write a c program to search every .php file on my server for a str match on "TH:i:s.u" but for some reason my c program's perror ( filename ); gives me this error msg ": No such file or directory" even though they file and directories are there and I can open them up in nano. So presently I am at a bit of a standstill.