We should standardize on consistent internationally comprehensible date/time formats throughout Drupal.org.
Factors we need to consider include:
- Ambiguity in numerical month vs. date (i.e: we Americans are bad at dates)
- Making the timezone offset clear to users logged out vs. logged-in.
- Using 24 hour time (which is fairly standard internationally and rare, but understood in the US) or providing a user account option for 12 vs 24 hour time.
Standard | Format | Example |
---|---|---|
Strict ISO 8061 | YYYY-MM-DDThh:mm±hh | 2016-08-11T16:42+00 |
Modified ISO 8061 | YYYY-MM-DD hh:mm (UTC±h) | 2016-08-11 16:42 (UTC+8) |
Int'l "human friendly" | DD MMM YYYY - hh:mm (UTC±h) | 11 Aug 2016 - 16:42 (UTC+8) |
We went with multiple formats for international human friendly date/time display. The following date types are not configured:
Long: 10 December 2016 at 00:09 GMT
Medium: 10 Dec 2016 at 00:09 GMT
Short: 2016-12-10 00:09 (this one is mostly used in reports and logging)
Date only: 10 December 2016
Current usage:
- Documentation pages 'Last update on' date: Date only
- Issue 'Created on' and 'Updated on' dates: Medium
- Dblog: Short
Todos:
Update various date/time display to use the following types:
- Forums 'Posted on' date: Medium
- Case studies, posts, projects, change records 'Posted on' date: Date only
- Commits list for projects /node/x/commits: Medium
- Planet Drupal posts: Medium
- Comments: Long without timezone (will need to configure additional type)
Original issue summary
In Europe, where I come from, we use the 24 hour clock, as does most of the world:
http://www.talkstandards.com/wp-content/uploads/2011/02/12-hour-clock.jpeg
"Outside of English-speaking countries, the terms a.m. and p.m. are seldom used and often unknown."
http://en.wikipedia.org/wiki/12-hour_clock#Use_by_country
I can never remember the difference between am and pm, and I am probably not the only one. So I suggest that new user profiles at drupal.org default to use the 24 clock system, with an option of changing the time format under the account settings, to use either 12 hour clock or 24 hour clock.
Comments
Comment #1
killes@www.drop.org CreditAttribution: killes@www.drop.org commentedmoving, I'd support this.
Comment #2
ressa CreditAttribution: ressa commentedThanks! Do you think implementing it requires a lot of work, so it has to wait for the upgrade of drupal.org to D8?
Comment #3
ressa CreditAttribution: ressa commentedHere is another argument for switching to the 24 hour clock, taken from the Drupal Content style guide, under "Numbers and Dates"
And this from the "Times" section of ISO 8601 Data elements and interchange formats – Information interchange – Representation of dates and times
I think drupal.org should comply with its own style guide :-)
Comment #4
dddave CreditAttribution: dddave commentedThat change would be very welcome.
Comment #5
raj45 CreditAttribution: raj45 commentedHow is it going with implementing the drupal.org style guide on drupal.org?
Comment #6
lizzjoyMoving to customizations for review
Comment #7
drummGrepping for
'[ _]date\b.*a['\''"]'
shows a few places with this formatting:The ones in bluecheese should move to drupalorg_crosssite. We're moving to keep all PHP code with custom modules.
Comment #8
hestenetI'm going to use this issue to merge a number of related issues about better internationalizing and standardizing date/time formats on D.O - updating the issue summary.
Comment #9
hestenetPersonally, I prefer formats closer to the 'human readable' end of the spectrum, but the ISO standard is sadly not that.
I'm not sure making 12 vs 24 hour time optional is necessary, I think the countries used to 12 hour time could probably handle 24. (But that's just 1 opinion)
Comment #10
ressa CreditAttribution: ressa as a volunteer commentedI agree, not surprisingly :-) 12 hour countries would probably be able to understand 24 hour time.
Comment #11
tvn CreditAttribution: tvn at Drupal Association commentedWe should strive for 'human readable' because it is indeed humans who will be reading it on our pages. :)
The 'int'l human friendly' option therefore looks best. We can still have multiple types of display across Drupal.org though even for a single format. E.g. some areas are not time-sensitive, so we can only display date, without time (documentation last updated or blog post published date).
So perhaps:
Medium: 11 Aug 2016 - 16:42 (UTC+8)
Short: 11 Aug 2016
Comment #12
tvn CreditAttribution: tvn at Drupal Association commentedWhile implementing the new documentation page content type, we needed to configure new date format to be used for 'Last updated on'. Using this opportunity, we've switched default date types to international format.
Right now there are only a few places that use default date types:
The rest of the places ('Posted on' dates on nodes and comments, etc.) mostly use hard-coded custom formats. Remaining todo items in this issue will be basically switching from custom to appropriate default date types.
We'll wait a week or so to see if there will be any feedback on this first small change, and then update the rest of the places where date/time is displayed.
Comment #13
tvn CreditAttribution: tvn at Drupal Association commentedUpdating summary.
Comment #15
drummComment #17
drummThis has been deployed.
Comment #19
ressa CreditAttribution: ressa at Ardea commentedThank you all so much for fixing this, I really appreciate to be able to actually relate to the times shown on the issues now. It means a lot to me.