Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

bugfix date for linux platform

  • Loading branch information...
commit cf4d4351885fbb275fd04ae219c2e8ea9d2ce035 1 parent 0ef6f40
@Tauop authored
Showing with 1 addition and 1 deletion.
  1. +1 −1  date.lib.sh
View
2  date.lib.sh
@@ -66,7 +66,7 @@ if [ "${__LIB_DATE__:-}" != 'Loaded' ]; then
date_from="$1"
[ $# -eq 2 ] && format="$2"
- result=$( date -d "${date_from}" "${format}" 2>/dev/null )
+ result=$( date -d "1970-01-01 UTC + ${date_from} seconds" "${format}" 2>/dev/null )
if [ $? -ne 0 ]; then
result=$( date -r "${date_from}" "${format}" 2>/dev/null )
[ $? -ne 0 ] && result="${date_from}"
Please sign in to comment.
Something went wrong with that request. Please try again.