Page 1 of 1

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

Posted: Thu Mar 03, 2011 8:46 pm
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.

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

Posted: Thu Mar 03, 2011 9:08 pm
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'}

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

Posted: Fri Mar 04, 2011 4:59 am
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.

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

Posted: Fri Mar 04, 2011 5:45 am
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

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

Posted: Fri Mar 04, 2011 3:52 pm
by DoctorWho
Thanks RonnyK!