Added new function: epoch2date.
This commit is contained in:
parent
e28fb54e03
commit
f35b07766c
@ -44,4 +44,12 @@ extract() {
|
|||||||
esac
|
esac
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# Misc functions
|
||||||
|
|
||||||
|
# convert epoch timestamp to human readable date
|
||||||
|
epoch2date() {
|
||||||
|
local string="${1:-0}"
|
||||||
|
date -d "@$string"
|
||||||
|
}
|
||||||
|
|
||||||
PATH=$PATH:$HOME/bin
|
PATH=$PATH:$HOME/bin
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user