timestamps.GlenCooper.com





All timestamps that Glen uses from 20170826T174836Z onward will use the ISO-8601 format of YYYYmmddTHHii(ss?)Z where:

  • Y = A full numeric representation of a year, 4 digits
  • m = Numeric representation of a month, with leading zeros
  • d = Day of the month, 2 digits with leading zeros
  • T = separator for Time
  • H = 24-hour format of an hour with leading zeros
  • i = Minutes with leading zeros
  • s = Seconds, with leading zeros (optional)
  • Z = timezone, which will always be ZULU time to avoid ambiguity.

    To change the way Linux displays file timestamps to this format:
    $ export TIME_STYLE='+%Y%m%dT%H%M%SZ'

    To see the current timestamp: (in Linux)
    $mrbtc@1satoshi:~$ date -u '+%Y%m%dT%H%M%SZ'
    20200201T000148Z
    mrbtc@1satoshi:~$

    To set your Linux shell prompt to look like mine:
    (add this line to your ~/.bashrc file):
    PROMPT_COMMAND="echo -n \$(date -u +%Y%m%dT%H%M%SZ):\ "

    To replace the $ on a CLI prompt with a B for Bitcoin, modify ~/.bashrc like this:
    https://gist.github.com/GlenCooper/fda87921aa3618be62623539ed0c4a64



  • GlenCooper.com