e107help.org Q&A
0 like 0 dislike
I'm using v.2.2.1 and I want to change time format on my homepage from 24 hr to 12hr. I tried changing under preferences/date display options but it's not changing. How do I change this? Thanks for any assistance I can get

Best regards

Max
e107 version 2.2.1
in Core by (2 points) 1

1 Answer

0 like 0 dislike

Well, basically you can use code using strftime. (Help does not seem to display : link )

Each setting belongs to something in site, hence the options.
Normally News is the one showing time > field 1 short date code

Long date f.e example is used in different areas (like profile etc.)

Test :

test in field 1 (short) paste:   %A %d hereiam %B heriam %Y  (save> go to site News>look)
it should display on News something like: Monday 07 hereiam December heriam 2020

 would you use (same field) %m-%d-%Y  would display like 12-07-2020
Note ! small chars or Capital makes differences.

so 1 field at a time, and only the one you need to change (so long dates/time and short mixed
per used 'item (news/forum etc..) is possible.

Maybe need to mention, old themes could have such in shortcodes, and per language through locales..)

 

by (3.3k points) 7 9 11
It is weirdthat he has problem with this, it is fully covered by core now. And for everything you wrote above, there is date handler, you just need to use mask not type of date.
Welcome to e107 Q&A, where you can ask questions and receive answers from other members of the e107 community.
948 questions
1,352 answers
2,388 comments
2,339 users