Display published time Topic is solved
Moderator: General Support Moderators
Forum rules
Forum Rules
Absolute Beginner's Guide to Joomla! <-- please read before posting.
Forum Post Assistant - If you are serious about wanting help, you should use this tool to help you post.
Windows Defender SmartScreen Issues <-- please read this if using Windows 10
Forum Rules
Absolute Beginner's Guide to Joomla! <-- please read before posting.
Forum Post Assistant - If you are serious about wanting help, you should use this tool to help you post.
Windows Defender SmartScreen Issues <-- please read this if using Windows 10
-
- Joomla! Enthusiast
- Posts: 223
- Joined: Fri Aug 26, 2005 8:59 am
Display published time
Hello
Articles on my J3.10.3 news site display the date they are published at the top, but not the time published, which I would like.
(If I ask them to they also display the date last modified, but I don't usually use that).
But I can't find an option to display time published, just date and time under Content > Articles.
Am I missing a setting somewhere, or might this be a template issue that I need to look into (or something else)? It was built with Themler.
Thanks
Articles on my J3.10.3 news site display the date they are published at the top, but not the time published, which I would like.
(If I ask them to they also display the date last modified, but I don't usually use that).
But I can't find an option to display time published, just date and time under Content > Articles.
Am I missing a setting somewhere, or might this be a template issue that I need to look into (or something else)? It was built with Themler.
Thanks
-
- I've been banned!
- Posts: 13639
- Joined: Sun Jul 05, 2009 3:30 am
- Location: Canberra, Australia
Re: Display published time
You can do this with a language override.
Go to Extensions » Languages » Override and select the language you wish to create an override for, e.g. English (United Kingdom) - Site.
Now search for the constant DATE_FORMAT_LC3, which probably has the valueand change it to Save the override and refresh the article at the frontend.
Go to Extensions » Languages » Override and select the language you wish to create an override for, e.g. English (United Kingdom) - Site.
Now search for the constant DATE_FORMAT_LC3, which probably has the value
Code: Select all
d F Y
Code: Select all
d F Y H:m
-
- Joomla! Enthusiast
- Posts: 223
- Joined: Fri Aug 26, 2005 8:59 am
Re: Display published time
Thank you. That worked for me. And I switched the month and day around and added a comma. I may try to change it to am/pm rather than 24hr clock: can this be done in the same way? Dare I ask, can months and days of the week be abbreviated using this method to take up less space? Cheers.
-
- Joomla! Enthusiast
- Posts: 223
- Joined: Fri Aug 26, 2005 8:59 am
Re: Display published time
Although having said that it worked, the 'minutes' past the hour don't seem to correspond with the 'start publishing' minutes past the hour in the back end, which seems odd.
-
- I've been banned!
- Posts: 13639
- Joined: Sun Jul 05, 2009 3:30 am
- Location: Canberra, Australia
Re: Display published time
Yes to all of those questions.xgipper wrote: ↑Sun Dec 05, 2021 9:40 pmThank you. That worked for me. And I switched the month and day around and added a comma. I may try to change it to am/pm rather than 24hr clock: can this be done in the same way? Dare I ask, can months and days of the week be abbreviated using this method to take up less space? Cheers.
See PHP date formats here: https://cheatography.com/unclepips/chea ... /php-date/
-
- Joomla! Enthusiast
- Posts: 223
- Joined: Fri Aug 26, 2005 8:59 am
Re: Display published time
Any clues as to why might the published time in the front end not quite match that in the back end, please? The date and hour seems correct, but the minutes seem generally wrong. (I put"F d, Y H:m" as the override.)
-
- I've been banned!
- Posts: 13639
- Joined: Sun Jul 05, 2009 3:30 am
- Location: Canberra, Australia
Re: Display published time
As you will see from the date format "cheat sheet" that I referred to in my previous post, the format I posted previously was wrong. Instead of "m" for minutes, it should have been "i". "m" is the numeric representation of the month! Therefore, to fix your issue, the format should be changed to read
Code: Select all
F d, Y H:i
-
- Joomla! Enthusiast
- Posts: 223
- Joined: Fri Aug 26, 2005 8:59 am
Re: Display published time
Excellent. I believe that has fixed it - and the cheat sheet has also enabled me to change some other formats around to suit my preference. Thank you.