3

I'm currently developing a dashboard for monitoring some objects that my corporation designs and manipulates. Those objects come with a date and time, that I translate from a cron table. In standard CRON, hours are expressed within the range 0-23 so it'd be great if I could express the time in a 24 hours format, that'd relieve me from the need of translating into AM/PM format.

I really would like to make my website user-friendly for everyone: I don't mind having to write more code, but I know that in the country I'm working in, people aren't very familiar with the AM/PM format and my coworkers are likely to get confused between times in the morning and past noon. As those latter represent the main pool of users for my website, I'd like to think a format that suit everyone, them and the English-speaking users.

Are English-speaking people familiar with the 24 hours format for expressing times?

  • I'd be hard-pressed to say which is more common in the UK: probably because both are used and I translate as necessary without thinking about it. But the 24-hour is certainly common, especially in timetables (busses, trains, planes). – TripeHound Feb 20 at 14:07
  • Any reason to not give the user the option to toggle between AM/PM & 24hr time formats? – Davbog Mar 4 at 23:15
  • Always default to 24-hour format in international contexts. Nobody knows whether 12 pm or 12 am is 12:00 (noon) or 00:00 (midnight, start of day) and 24:00 (end of day) is not available at all if needed. – Crissov Mar 15 at 14:56
6

Language and Regional preferences are two different things: there are english-speaking countries that use 24-hour clock and there are non-english countries that use 12-hour clock, and some use both. Moreover, how they use the 12-hour clock may differ, or they can use a completely different time format.

I think, proper solution would be change the display based on user's local preferences: in some cases you could even fetch the preferences from the device or browser (for example, by using toLocaleTimeString()), that way the user would see the time the way they expect it to be.

  • 1
    Agree: allowing the user to select the format seems the best way, either explicitly within your app, or based on their locale settings. – TripeHound Feb 20 at 14:03
2

In the U.S., the majority go by AM/PM and a great majority doesn’t know what to do with 0-24, unless they’ve been in the military or similar type of public service. I would definitely consider a solution that serves both depending on your audience.

1

Show both, 24 hour format first and prominent, as it's the international format (ISO 8601), followed by less prominent AM/PM format.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.