24 hour time format

Post

Posted
Rating:
Item has a rating of 5 Item has a rating of 5 Item has a rating of 5 Item has a rating of 5 Item has a rating of 5 (Liked by Adam EdingtonLiked by Paraz1t)
#523 (In Topic #155)
I think that  12 hour vs. 24 hour time format change has general interest.

First, I managed to do it. But it has not been done very easy, I couldn't find it in any settings.
Just referring to PHP manuals is not very friendly, at least to a noobie.

The answer is hidden In one old ocPortal forum discussions string;
you have to change in file lang/EN/global.ini every:

%i:%M:%P (p)
to %H:%M

And
time_hour=g a
time_hour_and_mins=g:i a
timezone_time=g:i a, l

to
time_hour=G
time_hour_and_mins=G:i
timezone_time=G:i, l


I made it by copying first the global.ini to lang_custom/global.ini to be on the safe side if I mess things.

I'm not sure if I did it quite right, but now I see 24 hour format in postings etc.


 

Post

Posted
Rating:
#532
You were ahead of me   ;)  I was, just, going to create a similar subject. But I want to go further, I am interested in a possibility of a choice of an hour format the user, for example in a profile.

Post

Posted
Rating:
#3216
I'm going to add this to the docs to make it more clear.

For anyone reading now, this has changed a bit. I don't think time_hour even exists now. But there are some more strings in the 'calendar' language file if the calendar is used.

It'll all be documented in the Composr Tutorial: Localisation and internationalisation tutorial.
0 guests and 0 members have recently viewed this.