Added sample epoch time conversion that works on many platforms.
Requirements:
* Works on Ubuntu 20-26, Rocky 8-10, SLES 15, and BSD and Mac (at least modern Mac, e.g. Tahoe)
* Accepts a datetamp in the form of YYYY/MM/DD or YYYY/MM/DD:HH:MM:SS (if the hour/minute/second is omitted, it defaults to 23:59:59).
* Provide an optional way to specify time zone, with UTC as the default.
Key Highlights
* Cross-Platform Compatibility: GNU Linux uses date -d, while BSD/macOS uses date -j -f "%Y/%m/%d %H:%M:%S". The if date --version check handles the branch automatically without relying on uname.
* Flexible Input: Handles both YYYY/MM/DD and YYYY/MM/DD:HH:MM:SS by leveraging shell parameter expansion (${INPUT_STAMP%%:*} and ${INPUT_STAMP#*:}).
* Timezone Safety: Sets TZ="$TARGET_TZ" per execution without mutating the caller's global shell environment.