date format in events list

Forum for questions and support relating to the 1.30.x releases only.
Locked
jajest
Posts: 7
Joined: Sat Nov 19, 2016 10:58 pm

date format in events list

Post 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
bbunge
Posts: 2976
Joined: Mon Mar 26, 2012 11:40 am
Location: Pennsylvania

Re: date format in events list

Post by bbunge »

No, it is not wrong. Just another way of showing the date.
jajest
Posts: 7
Joined: Sat Nov 19, 2016 10:58 pm

Re: date format in events list

Post 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 ?
User avatar
knight-of-ni
Posts: 2406
Joined: Thu Oct 18, 2007 1:55 pm
Location: Shiloh, IL

Re: date format in events list

Post by knight-of-ni »

The documentation is just a click away:
http://zoneminder.readthedocs.io/en/sta ... estamp-tab
Visit my blog for ZoneMinder related projects using the Raspberry Pi, Orange Pi, Odroid, and the ESP8266
All of these can be found at https://zoneminder.blogspot.com/
jajest
Posts: 7
Joined: Sat Nov 19, 2016 10:58 pm

Re: date format in events list

Post 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
User avatar
knight-of-ni
Posts: 2406
Joined: Thu Oct 18, 2007 1:55 pm
Location: Shiloh, IL

Re: date format in events list

Post 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.
Visit my blog for ZoneMinder related projects using the Raspberry Pi, Orange Pi, Odroid, and the ESP8266
All of these can be found at https://zoneminder.blogspot.com/
jajest
Posts: 7
Joined: Sat Nov 19, 2016 10:58 pm

Re: date format in events list

Post 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) ?
jajest
Posts: 7
Joined: Sat Nov 19, 2016 10:58 pm

Re: date format in events list

Post 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" );
Locked