- #!/bin/bash
- # Contribution from Kent Lewin.
- set -u
- declare Platform=
- # Convert Epoch Time to human-readable format.
- if [[ -z "${1:-}" ]]; then
- echo -e "\\nUsage: ${0##*/} <EpocTime>\\n\\nwhere <EpochTime> is a timestamp in Epoch Time form, e.g. 1735646399.\\n"
- exit 1
- else
- Platform=$(uname -s)
- if [[ "$Platform" == "Darwin" ]]; then
- date -r "$1" +"%Y-%m-%d-%H%M%S"
- else
- date -d "@$1" +"%Y-%m-%d-%H%M%S"
- fi
- fi
# | Change | User | Description | Committed | |
---|---|---|---|---|---|
#1 | 30378 | C. Thomas Tyler | Added epochtime utility. | 9 months ago |