sysfiles/usr/local/jilits/libdatetime.sh

14 lines
186 B
Bash
Raw Normal View History

2022-11-27 21:30:10 +01:00
#!/bin/bash
current_ue() {
date +%s
}
dt_to_ue() {
date --date="${1:?Datetime not set}" +%s
}
dt_to_pretty() {
date --date="${1:?Datetime not set}" +"%Y-%m-%d %H:%M:%S"
}