Skip to content
Rüdiger Beck edited this page Jul 18, 2021 · 5 revisions

Time

sophomorix reads the local time with the system command date into the sophomorix_configuration hash:

 "DATE"->"LOCAL"-> "TIMESTAMP_FILE" : "2018-01-17_13-30-24"`
                   "EPOCH" : 1516192224
                   "TIMESTAMP_LOG" : "2018-01-17 13:30:24"
                   "TIMESTAMP_AD" : "20180117133024.0Z"

All the 4 above timestamps:

  • are exactly the same to the second
  • are used in scripts for:
    • dirnames/filenames ("TIMESTAMP_FILE")
    • samba 4 AD entries ("TIMESTAMP_AD")
    • logfile entries ("TIMESTAMP_LOG")
    • time calculations ("EPOCH")
  • do stay the same throughout the run time of a script so that filenames, AD entries, ... created within the same run of a script use the same time
    • Two exeptions exists, when another time is used:
      • When a script ends, the exact end time is logged
      • When an (unexpected) exit is done, the exact exit time is logged (if the exit is gracefully)
Clone this wiki locally