Page 1 of 1

date format in events list

Posted: Sun Nov 20, 2016 12:08 pm
by jajest
when I take a look at the list of events, my date format is wrong.

I see now in the browser 11/20 as date (20th of Bovember) and it should be 20/11.

I cannot find any option to re-configure this ? any other possibilities known ?

marc

Re: date format in events list

Posted: Sun Nov 20, 2016 12:30 pm
by bbunge
No, it is not wrong. Just another way of showing the date.

Re: date format in events list

Posted: Sun Nov 20, 2016 1:01 pm
by jajest
I know it is not wrong but here in Belgium, the date format is: DD/MM/YYYY so I would like to see it like that.

Can I manipulate that ?

Re: date format in events list

Posted: Sun Nov 20, 2016 1:46 pm
by knight-of-ni
The documentation is just a click away:
http://zoneminder.readthedocs.io/en/sta ... estamp-tab

Re: date format in events list

Posted: Sun Nov 20, 2016 3:24 pm
by jajest
knnniggett wrote:The documentation is just a click away:
http://zoneminder.readthedocs.io/en/sta ... estamp-tab
I did notice this Timestap item but apparently this has only an influence when monitoring the stream. Then the date in the left above corner is indeed in the right format.

I was not talking about the live stream but about the (overview) events window itself. There all events are shown with the wrong date format.

Image

Re: date format in events list

Posted: Sun Nov 20, 2016 5:17 pm
by knight-of-ni
The images you are attaching do not show for me so if there is any relevant information in that I cannot see it.

UPDATE: I guess the screenshot would have helped. Seems I likely misunderstood. What I now understand you to mean is the events view a.k.a. events.php

Here is the relevant line of code where the format is set:
https://github.com/ZoneMinder/ZoneMinde ... s.php#L205

It checks STRF_FMT_DATETIME_SHORTER to determine the date format. This format can be defined in your language file.
https://github.com/ZoneMinder/ZoneMinde ... r/web/lang

If it is not defined in the language file you are using (Brussels .... so French??) then it defaults to "%m/%d %H:%M:%S".

So find where this is being set for your language, and then determine if that accurately reflects the time format for your region. You can edit the file yourself if you wish.
On the one hand, it would be nice if the language file set the desired format for you, but on the other hand I'd rather not change it permanently if what you are asking is more a personal preference than a standard everyone follows... don't want to fix it for one person but break it for many others.

Re: date format in events list

Posted: Sun Nov 20, 2016 6:36 pm
by jajest
thanks for the elaboration !

how about it making a parameter in the options so that everyboy can configure it as they want (= not breaking for many others) ?

Re: date format in events list

Posted: Mon Nov 21, 2016 7:07 am
by jajest
anyway, I have added the following line in the language file en_gb.php (located in /usr/share/zoneminder/www/lang) and everything is OK now:

define( "STRF_FMT_DATETIME_SHORTER", "%m/%d %H:%M:%S" );