From Mageia wiki
Jump to: navigation, search

Regarding date format: I make the following observations:

a) It is useful and practical to use a date format that will easily present chronological ordering when sorted.

  YYYY_MM_DD_hh_mm_ss_Z
  where:
        YYYY is 4 digit year
        MM is 2 digit month
        DD is 2 digit day
        hh is 2 digit hours (0..23)
        mm is 2 digit minutes
        ss is 2 digit seconds
        Z indicates time-zone meaning "zulu" or GMT or UCT.
   Whenever dates and times are used, it is helpful to standardise on one for the purpose of logging
   because it makes the comparison/sorting of date/time data a simple sort without need for converting
   between time zones. This is not to say that a system's TZ would be GMT/UCT but that when a date/time
   is logged (eg time of install) then the "Z" indicates it is GMT/UCT not local time zone.

b) It is also useful to record the epoch value (number of seconds since midnight on 1st January 1970) and an integer value

  because: i) it is again easily sortable ii) it is easy to convert to any prefered date/time format.
  Again, the standardisation on GMT/UCT for the epoch value makes comparison/sorting easier for larger data sets.

Why is it useful to use sortable date formats? It simply enables making a timeline of events to speed and facilitate analysis.

--codegazer

lewyssmith: It was silly of me to be picky about the exact date presentation, so I have deleted that bit. The date is what counts!