Time formats

Time can be respresented in 2 main formats: 12-hour and 24-hour. There are other formats such as military or aviation but they are derived from these as well.

In this format, the day is divided into 2 periods:

  • am (from Latin ante meridiem) meaning before midday
  • pm (from Latin post meridiem) meaning after midday

Each period is 12 hours long (hence the name 12-hour) in the following order: 12, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11.
The first period of the day starts at midnight (12 am) and ends just before noon (11:59 am).
The second period of the day starts at noon (12 pm) and ends just before midnight of the next day (11:59 pm).

Midnight/noon confusion

It can be hard to remember if 12 am and 12 pm is midnight or noon. The trick is to remember that 12 is the starting hour of the period, so 12 pm is the start of the pm period, therefore it is noon. 12 am is the start of the am period, therefore it is midnight.
If you’re confused about the period names (am/pm) and which of them comes first, try to remember that “p” in “pm” stand for “post”, so it is the latter period, or “post noon” period.

In this format the hours go from 0 to 23, starting at midnight. So 00:00 is the start of the day at midnight, 12:00 is noon and 23:59 is the end of the day.

The hour 24:00 of a specific day is the same as 00:00 of the following day. The convention is to use 00:00 to mark midnight when telling time, but in some cases, especially when the time indicates the end of a time range or arrival time, the use of 24:00 is better. For example, if an event is from 4 in the afternoon until the end of the day, the way to write it would be “16:00 - 24:00”.

In some cases, especiall when refering to an international audience (like the internet) it may be good to use the format “hh:mm” for the 24-hour format, which means the hour is always 2 digits. If the hour is a single digits, a zero is added before (e.g. “04” “09”).
The reason is that when using 24-hour format for single digit hour time (e.g. 3:45, 6:00) may confuse people that are used to the 12-hour format and may think that the “am/pm” is simply forgotten.
When writing 03:45 or 06:00 instead, it implies that the 24-hour format is used.

No colon

In some places, like the army, the 24-hour format is used but without a colon. So “04:30” becomes “0430”. When speaking the time, the leading zero is also spoken, so the time “04:30” would read “zero four thirty”.

From 12-hour to 24-hour

If the time is in “am” period (e.g. 6:30am) it’s the same as in 24-hour, but you may add a zero if the hour is 1-letter: 06:30.
If the time is in “pm” period (e.g. 6:30pm), you just add 12 to the hour: 6+12=18 so the time becomes 18:30.

From 24-hour to 12-hour

If the hour is below 12, you just add “am”, so 01:30 becomes 1:30am. If the hour is above 12, you subtract 12 and add “pm”, so 13:30 becomes 1:30pm.

Remember that 00:00 is 12:00am and 12:00 is 12:00pm.

12:00
12:00 PM

When a more precise time is needed, the seconds can be added after a colon (:) e.g. “4:30:56 pm” or “16:30:56”.
Milliseconds can also be added, usually after a dot (.) e.g. “16:30:56.836” to indicate 836 milliseconds.
Note that time format is cascading, so millisecond is only used when seconds are also used, seconds are only used when minutes are used, etc.

When a user visits for the first time, we first try to guess the hour format he would prefer based on his origin. If we could not guess, we default to showing the 24-hour format.