[Solved] News mod: 12 hour clock when adding articles?

For questions and problems with the CMS core. This board is NOT for any 3rd party modules, addons, PHP scripts or anything NOT distributed with the CMS made simple package itself.
Post Reply
DoctorWho
Forum Members
Forum Members
Posts: 34
Joined: Mon Jan 24, 2011 5:14 pm
Location: USA

[Solved] News mod: 12 hour clock when adding articles?

Post by DoctorWho »

In the news mod, is it possible to change the clock from a 24 hour clock to a 12 hour clock when adding articles?

I did a search in the news mod folder for: time, clock, 12, and 24; but I couldn't find anything.
Last edited by DoctorWho on Fri Mar 04, 2011 3:53 pm, edited 1 time in total.
CMSMS: 1.9.4.3 | PHP: 5.2.12 | MySQL: 5.0.45 | Linux
Wishbone
Power Poster
Power Poster
Posts: 1368
Joined: Tue Dec 23, 2008 8:39 pm

Re: News mod: 12 hour clock when adding articles?

Post by Wishbone »

Are you speaking of the front end or the admin panel?

in 'User Preferences' and 'Global Settings' there is a field called 'Date Format String'. This determines the format of the date in the admin panel modules (such as News) and is the default date format in the front end. As the prompt says: 'try googling strftime'

On the front end, the templates (site, summary, detail) use {$date|cms_date_format}.. You can put your own date format there like {$date|'your format string here'}
DoctorWho
Forum Members
Forum Members
Posts: 34
Joined: Mon Jan 24, 2011 5:14 pm
Location: USA

Re: News mod: 12 hour clock when adding articles?

Post by DoctorWho »

Thanks wishbone for replying to post so fast, i deeply appreciate it.

I am speaking of the admin area.

In the News mod, when I go to add a new article, the hour drop-down menu is in a 24 hour clock format (00-23); and I would like it to be in a 12 hour format (01-12).

Similar to how the CGcalendar mod under the settings tab gives you the option to "Use twelve hour clock on hour drop-downs"

I went to 'User Preferences' and to 'Global Settings' and I added %I to the 'Date Format String' field, but that didn't change anything.
CMSMS: 1.9.4.3 | PHP: 5.2.12 | MySQL: 5.0.45 | Linux
RonnyK
Support Guru
Support Guru
Posts: 4962
Joined: Wed Oct 25, 2006 8:29 pm
Location: Raalte, the Netherlands

Re: News mod: 12 hour clock when adding articles?

Post by RonnyK »

correct, the dateformat thing only drives the display. The News module only has the current dropdown. If you want something else, you could file a FeatureRequest in the forge.

Ronny
DoctorWho
Forum Members
Forum Members
Posts: 34
Joined: Mon Jan 24, 2011 5:14 pm
Location: USA

Re: News mod: 12 hour clock when adding articles?

Post by DoctorWho »

Thanks RonnyK!
CMSMS: 1.9.4.3 | PHP: 5.2.12 | MySQL: 5.0.45 | Linux
Post Reply

Return to “CMSMS Core”