Change Date format
Moderator: General Support Moderators
Forum rules
Forum Rules
Absolute Beginner's Guide to Joomla! <-- please read before posting, this means YOU.
Forum Post Assistant - If you are serious about wanting help, you will use this tool to help you post.
Forum Rules
Absolute Beginner's Guide to Joomla! <-- please read before posting, this means YOU.
Forum Post Assistant - If you are serious about wanting help, you will use this tool to help you post.
-
- Joomla! Apprentice
- Posts: 35
- Joined: Sat Dec 11, 2010 8:55 am
Change Date format
I have followed http://docs.joomla.org/How_do_you_chang ... _format%3F for my site http://www.woodriverabilityprogram.org/joomla/ yet as you can see the date has not changed.
I'm using Joomla 2.5.4 and K2 2.5.7 and the Cloudbase 2.0 template
What am I doing wrong?
I'm using Joomla 2.5.4 and K2 2.5.7 and the Cloudbase 2.0 template
What am I doing wrong?
Brad
- imanickam
- Joomla! Master
- Posts: 28202
- Joined: Wed Aug 13, 2008 2:57 am
- Location: Chennai, India
Re: Change Date format
The document you are referencing is for Joomla! 1.5 - NOT for 2.5.
In 1.5, the UNIX date format is being used. In 1.7, the PHP date format is being used. Review of the site http://php.net/manual/en/function.date.php would be of help.
If you want to change the way the date shows, you have to change is the following formats that is available in the file en-GB.ini that located in the directory \language\en-GB
In 2.5, in the Language Manager, you have a tab for Language Overrides and you could use that for changing and testing the override language strings.
In 1.5, the UNIX date format is being used. In 1.7, the PHP date format is being used. Review of the site http://php.net/manual/en/function.date.php would be of help.
If you want to change the way the date shows, you have to change is the following formats that is available in the file en-GB.ini that located in the directory \language\en-GB
Code: Select all
DATE_FORMAT_LC="l, d F Y"
DATE_FORMAT_LC1="l, d F Y"
DATE_FORMAT_LC2="l, d F Y H:i"
DATE_FORMAT_LC3="d F Y"
DATE_FORMAT_LC4="Y-m-d"
DATE_FORMAT_JS1="y-m-d"
Ilagnayeru (MIG) Manickam | இளஞாயிறு மாணிக்கம்
Joomla! - Global Moderators Team | Joomla! Core - Tamil (தமிழ்) Translation Team Coordinator
Former Joomla! Translations Coordination Team Lead
Eegan - Support the poor and underprivileged
Joomla! - Global Moderators Team | Joomla! Core - Tamil (தமிழ்) Translation Team Coordinator
Former Joomla! Translations Coordination Team Lead
Eegan - Support the poor and underprivileged
-
- Joomla! Apprentice
- Posts: 35
- Joined: Sat Dec 11, 2010 8:55 am
Re: Change Date format
I guess your docs need updating then as I did a search for date format and only found that.
What do LC, LC1, LC2, etc mean? Why is there a separate format for each?
What do LC, LC1, LC2, etc mean? Why is there a separate format for each?
Brad
- imanickam
- Joomla! Master
- Posts: 28202
- Joined: Wed Aug 13, 2008 2:57 am
- Location: Chennai, India
Re: Change Date format
Yes, you are correct. However, I would like a small correction - it is not "your docs", it is "our docs". Be informed that almost all the things that go around Joomla! (e.g., documentation, forum administration, forum moderation, etc.) are all done by volunteers such as you and me. So, I encourage/request your involvement in these activities as well.ae6dx wrote:I guess your docs need updating then as I did a search for date format and only found that.
For example, in the articles the format DATE_FORMAT_LC2 is being used, in the lists the format DATE_FORMAT_LC3 is being used and so forth. One has to go through the code to understand it.ae6dx wrote:What do LC, LC1, LC2, etc mean? Why is there a separate format for each?
Ilagnayeru (MIG) Manickam | இளஞாயிறு மாணிக்கம்
Joomla! - Global Moderators Team | Joomla! Core - Tamil (தமிழ்) Translation Team Coordinator
Former Joomla! Translations Coordination Team Lead
Eegan - Support the poor and underprivileged
Joomla! - Global Moderators Team | Joomla! Core - Tamil (தமிழ்) Translation Team Coordinator
Former Joomla! Translations Coordination Team Lead
Eegan - Support the poor and underprivileged
-
- Joomla! Apprentice
- Posts: 35
- Joined: Sat Dec 11, 2010 8:55 am
Re: Change Date format
Ok I guess I'm doing it wrong. I did the overrides but nothing changed. Does the fact they are K2 items and not Joomla articles make a difference?
Brad
- infograf768
- Joomla! Master
- Posts: 19133
- Joined: Fri Aug 12, 2005 3:47 pm
- Location: **Translation Matters**
Re: Change Date format
It could. One would have to check the code used in K2 to display items to see which constants are used.ae6dx wrote:Ok I guess I'm doing it wrong. I did the overrides but nothing changed. Does the fact they are K2 items and not Joomla articles make a difference?
Jean-Marie Simonet / infograf
---------------------------------
ex-Joomla Translation Coordination Team • ex-Joomla! Production Working Group
---------------------------------
ex-Joomla Translation Coordination Team • ex-Joomla! Production Working Group
-
- Joomla! Apprentice
- Posts: 17
- Joined: Fri Aug 17, 2012 4:00 pm
Re: Change Date format
I am having the same issue.I am using Joomla 2.5.8 and I DO NOT have K2 installed.
The default international date format is displaying as such: TUESDAY, 18 DECEMBER 2012 17:00
I first created language/en-GB.override.ini and added DATE_FORMAT_LC2="l, d F Y" to override the default setting in language/en-GB.ini. That did nothing so I changed the value directly in the source file from DATE_FORMAT_LC2="l, d F Y H:i" to DATE_FORMAT_LC2="l, d F Y", removing the 'H:i'. But the hour (17:00) still displays on articles.
I am lost.
The default international date format is displaying as such: TUESDAY, 18 DECEMBER 2012 17:00
I first created language/en-GB.override.ini and added DATE_FORMAT_LC2="l, d F Y" to override the default setting in language/en-GB.ini. That did nothing so I changed the value directly in the source file from DATE_FORMAT_LC2="l, d F Y H:i" to DATE_FORMAT_LC2="l, d F Y", removing the 'H:i'. But the hour (17:00) still displays on articles.
I am lost.
- imanickam
- Joomla! Master
- Posts: 28202
- Joined: Wed Aug 13, 2008 2:57 am
- Location: Chennai, India
Re: Change Date format
The override file en-GB.override.ini has to be in the directory \language\overrides.mackdoyle wrote:I first created language/en-GB.override.ini
Ilagnayeru (MIG) Manickam | இளஞாயிறு மாணிக்கம்
Joomla! - Global Moderators Team | Joomla! Core - Tamil (தமிழ்) Translation Team Coordinator
Former Joomla! Translations Coordination Team Lead
Eegan - Support the poor and underprivileged
Joomla! - Global Moderators Team | Joomla! Core - Tamil (தமிழ்) Translation Team Coordinator
Former Joomla! Translations Coordination Team Lead
Eegan - Support the poor and underprivileged
- infograf768
- Joomla! Master
- Posts: 19133
- Joined: Fri Aug 12, 2005 3:47 pm
- Location: **Translation Matters**
Re: Change Date format
It may be that your template is using an override for the article display.mackdoyle wrote:I am having the same issue.I am using Joomla 2.5.8 and I DO NOT have K2 installed.
The default international date format is displaying as such: TUESDAY, 18 DECEMBER 2012 17:00
I first created language/en-GB.override.ini and added DATE_FORMAT_LC2="l, d F Y" to override the default setting in language/en-GB.ini. That did nothing so I changed the value directly in the source file from DATE_FORMAT_LC2="l, d F Y H:i" to DATE_FORMAT_LC2="l, d F Y", removing the 'H:i'. But the hour (17:00) still displays on articles.
I am lost.
Also, use the Language Manager->Overrides to create the override in the right folder (choose site or admin for the language concerned)
Jean-Marie Simonet / infograf
---------------------------------
ex-Joomla Translation Coordination Team • ex-Joomla! Production Working Group
---------------------------------
ex-Joomla Translation Coordination Team • ex-Joomla! Production Working Group
-
- Joomla! Apprentice
- Posts: 17
- Joined: Fri Aug 17, 2012 4:00 pm
Re: Change Date format
Thanks! That did it. Still strange that modifying the source file didn't do it, though. It must have been a cache issue that was cleared since I looked at it last.imanickam wrote:The override file en-GB.override.ini has to be in the directory \language\overrides.mackdoyle wrote:I first created language/en-GB.override.ini
-
- Joomla! Apprentice
- Posts: 17
- Joined: Fri Aug 17, 2012 4:00 pm
Re: Change Date format
infograf768 wrote:It may be that your template is using an override for the article display.mackdoyle wrote:I am having the same issue.I am using Joomla 2.5.8 and I DO NOT have K2 installed.
The default international date format is displaying as such: TUESDAY, 18 DECEMBER 2012 17:00
I first created language/en-GB.override.ini and added DATE_FORMAT_LC2="l, d F Y" to override the default setting in language/en-GB.ini. That did nothing so I changed the value directly in the source file from DATE_FORMAT_LC2="l, d F Y H:i" to DATE_FORMAT_LC2="l, d F Y", removing the 'H:i'. But the hour (17:00) still displays on articles.
I am lost.
Also, use the Language Manager->Overrides to create the override in the right folder (choose site or admin for the language concerned)
Thanks Infograf. I had tried that before but now realize the the [value] radio button is checked by default in the search so searching for DATE_FORMAT was returning nothing. Once I switched it to search for the [Constant], it pulled right up.
-
- Joomla! Hero
- Posts: 2268
- Joined: Sat Feb 09, 2008 8:27 am
- Location: California, USA
Re: Change Date format
For additional information others can also read the following post:
http://forum.joomla.org/viewtopic.php?f ... e#p2952166
Mark
http://forum.joomla.org/viewtopic.php?f ... e#p2952166
Mark
-
- Joomla! Apprentice
- Posts: 8
- Joined: Wed Jan 22, 2014 11:23 pm
Re: Change Date format
Awesome. I used the information after upgrading my Joomla site from 1.5 to 2.5. I'm using the js_jamba template. After I upgraded with SPUpgrade, I installed the 2.5 js_jamba template from Joomlashack.
Using the Language Overrides, DATE_FORMAT_LC4 fixed my articles. DATE_FORMAT_LC3 fixed my blog layouts. I set both to "F j, Y" (with no quotes). Most of my users are American, so this is perfect. In the template code, it looks like it's using DATE_FORMAT_LC2, but changing that didn't do anything.
I didn't want to change any code that might break in the next upgrade. This forum saved me a boatload of time.
Bob
Using the Language Overrides, DATE_FORMAT_LC4 fixed my articles. DATE_FORMAT_LC3 fixed my blog layouts. I set both to "F j, Y" (with no quotes). Most of my users are American, so this is perfect. In the template code, it looks like it's using DATE_FORMAT_LC2, but changing that didn't do anything.
I didn't want to change any code that might break in the next upgrade. This forum saved me a boatload of time.
Bob
Last edited by imanickam on Thu Jan 23, 2014 5:42 am, edited 1 time in total.
Reason: Manual Signature removed
Reason: Manual Signature removed