home_bin/time/time2unix

8 lines
148 B
Bash
Executable file

#!/bin/bash
ht="${1:-now}"
ut="$(date '+%s' -d "$ht")"
echo "Human Time: $ht"
echo "Unix Time : $ut"
ht="$(date -d "@$ut")"
echo "Human Time: $ht"