A handful of date and time related functions that might come in handy.
- Convert a date or time string to seconds from epoch
PHP Code:
# ------------------------------------------------------------------ #
# Function : dateToSecs
# Syntax : dateToSecs "[date]"
# Convert a date or time string to seconds from epoch.
# ------------------------------------------------------------------ #
function dateToSecs() {
[[ $# -eq 0 ]] && date --utc
...