24 hour time format

Post

Posted
Rating:
Item has a rating of 5 (Liked by Adam EdingtonLiked by Paraz1t)
#461 (In Topic #99)
Avatar
Standard member
Finncat is in the usergroup ‘Fan in action’
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.


 
Online now: No Back to the top

Post

Posted
Rating:
#470
Avatar
Standard member
Paraz1t is in the usergroup ‘Fan in action’
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.
Online now: No Back to the top

Post

Posted
Rating:
#3221
Avatar
Site director
Chris Graham is in the usergroup ‘Administrators’
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.


Become a fan of Composr on Facebook or add me as a friend. Add me on on Mastodon. Follow me on Minds (where I am most active). Support me on Patreon

Was I helpful?
  • If not, please let us know how we can do better (please try and propose any bigger ideas in such a way that they are fundable and scalable).
  • If so, please let others know about Composr whenever you see the opportunity or support me on Patreon.
  • If my reply is too Vulcan or expressed too much in business-strategy terms, and not particularly personal, I apologise. As a company & project maintainer, time is very limited to me, so usually when I write a reply I try and make it generic advice to all readers. I'm also naturally a joined-up thinker, so I always express my thoughts in combined business and technical terms. I recognise not everyone likes that, don't let my Vulcan-thinking stop you enjoying Composr on fun personal projects.
  • If my response can inspire a community tutorial, that's a great way of giving back to the project as a user.
Online now: No Back to the top
1 guest and 0 members have just viewed this.
Back to Top