Is there a way to change the time format to a 12-hour format (i.e., 8 a.m., 3 p.m.) instead of a 24-hour format? I've searched the issue queue and documentation and have not been able to find a solution.

CommentFileSizeAuthor
#8 time-format-redmine.png39.4 KBfrancewhoa
#7 formats.png51.75 KBfrancewhoa

Comments

juliangb’s picture

Version: 6.x-2.0 » 6.x-2.x-dev
Category: support » feature

This isn't currently possible, but I will keep as a feature request as at somepoint we need to overhaul the way that dates and times are handled in Storm. We may be able to do this at that point.

francewhoa’s picture

Version: 7.x-1.x-dev » 6.x-2.x-dev

+1 for that new feature

I suggest adding that new feature setting at /admin/settings/storm under a new section titled "Time format". With two options, as follow

1. Based on user's language: times will be displayed specifically for each user, according to the format defined for its language
2. Other formats: times will always be displayed using the specified format

Default would be based on user's language

setting time format

What do you think?

Any volunteer for a patch? We would be happy to contribute testing :)

Options inspired from http://www.redmine.org/projects/redmine/wiki/RedmineSettings#Time-format

juliangb’s picture

Version: 6.x-2.x-dev » 7.x-1.x-dev

At the moment we're focussing on getting Storm into Drupal 7.

Do you have examples of what Drupal core does, and likewise for other Drupal contrib modules?

francewhoa’s picture

Issue tags: +examples

At the moment we're focussing on getting Storm into Drupal 7.

Sounds great :) Make sense.

Do you have examples of what Drupal core does, and likewise for other Drupal contrib modules?

Sure here are 3

  • Date module as an easy setting for that at admin/settings/date-time/formats It has a date formatters that include a 'time' setting.
  • Drupal 6 has a core feature at /admin/settings/date-time under "Formatting" section. Open the drop down menu. Select "Custom format"
  • PHP manual with options at http://ca1.php.net/manual/en/function.date.php
g 	12-hour format of an hour without leading zeros 	 1 through 12
G 	24-hour format of an hour without leading zeros 	 0 through 23
h 	12-hour format of an hour with leading zeros 	        01 through 12
H 	24-hour format of an hour with leading zeros 	        00 through 23
francewhoa’s picture

Issue tags: -examples

removed tag

juliangb’s picture

I see that Drupal 7 also has a core date/time format selection in core similar to the one that you describe for Drupal 6.

We'd definitely want to utilise this and not do this by ourselves.

francewhoa’s picture

StatusFileSize
new51.75 KB

I see that Drupal 7 also has a core date/time format selection in core similar to the one that you describe for Drupal 6.

Yup, D7 core feature at Configuration -> Regional & Language -> Date and time -> Formats -> Add format
or /admin/config/regional/date-time/formats

We'd definitely want to utilise this and not do this by ourselves.

Indeed. That's the beauty of open source :)

Examples for programatically creating date formats at http://www.agileapproach.com/blog-entry/programatically-creating-date-fo...

francewhoa’s picture

StatusFileSize
new39.4 KB

Attaching screenshot for comment at http://drupal.org/node/1685356#comment-6783356

juliangb’s picture

Version: 6.x-2.x-dev » 7.x-1.x-dev
Status: Active » Closed (won't fix)

This will be handled in Drupal 7 by the date module.

#1929158: Use date fields from the date module.