5.3. Datetime Standards

  • Date and time formats varies from country to country [19]

5.3.1. Date

Formal date format in USA [26]

4/12/61         # short
April 12, 1961  # long

Formal date format in Japan [25]:

61/04/12        # short
1961年04月12日   # long

20/12/31        # short
平成20年12月31日  # long

Formal date format in Germany:

12.04.1961      # only

Date format in Poland:

12 kwietnia 1961
12 kwiecień 1961

12 IV 1961
12.IV.1961

12.4.1961
12.04.1961

12/4/1961
12/04/1961

12-04-1961
1961-04-12

Which format is a formal standard in Poland? There is no formal standard for date format in Poland. There is only a recommendation to write dates using ISO-8601 format (yyyy-mm-dd) [24]. However hardly anyone including government in official documents and forms is using it.

5.3.2. 24 Hour Clock

07:00       # morning
19:00       # evening
../../_images/datetime-standards-clock-24h.jpg

5.3.3. 12 Hour Clock

  • What AM stands for?

  • What PM stands for?

7:00 AM     # morning
7:00 PM     # evening
../../_images/datetime-standards-clock-12h.jpg

5.3.4. Noon and Midnight

  • Confusion at noon and midnight [20]

  • Which time is a midnight?

  • Which time is a noon?

24 hour clock:

00:00
12:00

12 hour clock:

12:00 am
12:00 pm

5.3.5. Exactly Midnight

  • 00:00:00.000000 - day start, exactly midnight

  • 23:59:59.999999 - day end, excluding last microsecond

  • 24:00:00.000000 - day end, including last microsecond

Day end, excluding last microsecond:

start = 2000-01-01 00:00:00.000000
  end = 2000-12-31 23:59:59.999999

Day end, including last microsecond:

start = 2000-01-01 00:00:00.000000
  end = 2000-12-31 24:00:00.000000

5.3.6. After Midnight

  • Times after Midnight [21]

23:00 - 25:30   # 23:00-01:30 --> 2h 30m
14:00 - 26:00   # 14:00-02:00 --> 12h 0m

5.3.7. Leap Second

  • UTC leap second [18]

  • Leap second discontinuation post 2035 [1]

  • Issues created by insertion (or removal) of leap seconds

  • Calculation of time differences and sequence of events

  • Missing leap seconds announcement

  • Implementation differences

  • Textual representation of the leap second

  • Binary representation of the leap second

  • Other reported software problems associated with the leap second

  • June 30th or December 31st

  • Introduced in 1972

  • Last leap second in 2016

23:59:59 -> 00:00:00                # Normal second
23:59:59 -> 23:59:60 -> 00:00:00    # Leap Second

5.3.8. Zero Padded

  • Zero padded minutes, seconds and microseconds but not hours

  • Variable length microseconds

Hours:

06:07               # ok
6:07                # ok

Minutes:

06:07               # ok
06:7                # error

Seconds:

06:07:00            # ok
06:07:0             # error
06:07:              # error
06:07               # ok

Microseconds:

06:07:00.000000     # ok
06:07:00.00000      # ok
06:07:00.0000       # ok
06:07:00.000        # ok
06:07:00.00         # ok
06:07:00.0          # ok
06:07:00            # ok

Microseconds:

06:07:00.000001     # different time, different length
06:07:00.00001      # different time, different length
06:07:00.0001       # different time, different length
06:07:00.001        # different time, different length
06:07:00.01         # different time, different length
06:07:00.1          # different time, different length

06:07:00.000001     # different time, same length
06:07:00.000010     # different time, same length
06:07:00.000100     # different time, same length
06:07:00.001000     # different time, same length
06:07:00.010000     # different time, same length
06:07:00.100000     # different time, same length

06:07:00.100000     # same time, different length
06:07:00.10000      # same time, different length
06:07:00.1000       # same time, different length
06:07:00.100        # same time, different length
06:07:00.10         # same time, different length
06:07:00.1          # same time, different length

5.3.9. Roman Numerals

  • In latin V is read as U

  • In latin I is read as J

  • In latin IV is read as JU

  • JU stands for Jupyter - roman god

  • Louis XIV did not like IV and changed to IIII [27]

  • There is a symetry in groups of four I, II, III, IIII, V, VI, VII, VIII, IX, X, XI, XII

../../_images/datetime-standards-roman-watch.jpg
IV
IIII

There is a symetry in groups of four:

I,   II,  III,  IIII    # Group with I and I
V,   VI,  VII,  VIII    # Group with V and I
IX,  X,   XI,   XII     # Group with X and I

In latin V is read as U, I is read as J, therefore IV is read as JU which stands for Jupyter - roman god.

../../_images/datetime-standards-roman-inscription.jpg

5.3.10. Calendars

  • Julian Calendar [8]

  • Gregorian Calendar [3]

  • Introduced by Pope Gregory XIII in October 1582

  • Saudi Arabia was the last country to adopt Gregorian calendar in 2016

  • There are only four countries which have not adopted the Gregorian calendar: Ethiopia (Ethiopian calendar), Nepal (Vikram Samvat and Nepal Sambat), Iran and Afghanistan (Solar Hijri calendar)

  • List of adoption dates of the Gregorian calendar by country [2]

Table 5.1. Brief summary of adoption dates of the Gregorian calendar per country [2]

Year

Country/-ies/Areas

1582

Spain, Portugal, France, Polish-Lithuanian Commonwealth, Italy, Catholic Low Countries, Luxembourg, and colonies thereof

1584

Kingdom of Bohemia, some Catholic Swiss cantons

1610

Prussia

1648

Alsace

1682

Strasbourg

1700

Protestant Low Countries, Norway, Denmark, some Protestant Swiss cantons

1752

Great Britain, Ireland, and the 'First' British Empire (1707–1783)

1753

Sweden and Finland

1873

Japan

1875

Egypt

1896

Korea

1912

China, Albania

1915

Latvia, Lithuania

1916

Bulgaria

1917

Ottoman Empire

1918

Ukraine, Russia, Estonia

1919

Romania, Yugoslavia

1923

Greece

1926

Turkey (common era years; Gregorian dates in use since 1917 Ottoman adoption)

2016

Saudi Arabia

5.3.11. Astronomy

  • Synodic day - the period for a celestial object to rotate once in relation to the star it is orbiting [10]

  • Solar time - calculation of the passage of time based on the position of the Sun in the sky [9]

  • Epoch (astronomy) [5]

  • Sidereal Time [4]

  • JD - Julian Day [6]

5.3.12. Databases

  • SQLite dates and time are stored as TEXT, INTEGER or REAL values.

  • TEXT as ISO-8601 strings ('YYYY-MM-DDTHH:MM:SS.SSS').

  • INTEGER as timestamp, the number of seconds since 1970-01-01 00:00:00 UTC.

  • REAL as Julian day numbers, the number of days since noon in Greenwich on November 24, 4714 B.C. according to the Gregorian calendar.

Applications can chose to store dates and times in any of these formats and freely convert between formats using the built-in date and time functions.

5.3.13. Space Industry

  • UTC - Coordinated Universal Time [13]

  • GMT - Greenwich Mean Time [11]

  • MET - Mission Elapsed Time

  • Relativistic effects

  • Time dilatation due to speed approaching speed of light

5.3.14. Planet Mars

  • MSD - Mars Sol Date [15]

  • MTC - Coordinated Mars Time [16]

  • Timekeeping on Mars [14]

  • Mars Clock [12]

  • Martian sidereal day is 24 h 37 m 22.663 s (88,642.663 seconds)

  • Martian solar day is 24 h 39 m 35.244 s (88,775.244 seconds)

5.3.15. Military Time

  • Military time [22]

  • Military time zones [23]

  • 24 hour clock

../../_images/datetime-standards-militarytime.webp

5.3.16. Decimal Time

  • Unix time gives date and time as the number of seconds since January 1, 1970

  • Microsoft's FILETIME as multiples of 100ns since January 1, 1601 [17]

  • VAX/VMS uses the number of 100ns since November 17, 1858 [17]

  • RISC OS the number of centiseconds since January 1, 1900 [17]

5.3.17. Other

  • Swatch Internet Time - Beats @300 [7]

  • sidereal day on Earth is approximately 86164.0905 seconds (23 h 56 min 4.0905 s or 23.9344696 h)

5.3.18. References