Skip to content

Commit d16599d

Browse files
committed
Update git-semver.sh
Change date args to be compatible with OSX. Fixes #9
1 parent 93857e2 commit d16599d

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

git-semver.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -172,12 +172,12 @@ update() {
172172

173173
if [ -n "$silent" ]
174174
then
175-
local time_curr=$(date -d "${date_curr}" "+%s")
175+
local time_curr=$(date -j -f "%Y-%m-%d" "${date_curr}" +%s)
176176
local time_prev=""
177177
local time_check=$((${time_curr} - ${UPDATE_CHECK_INTERVAL_DAYS} * 86400))
178178
if [ -f "${FILE_UPDATE}" ]
179179
then
180-
time_prev=$(date -d "$(cat ${FILE_UPDATE} | tr -d $'\n')" "+%s")
180+
time_prev=$(date -j -f "%Y-%m-%d" "$(cat ${FILE_UPDATE} | tr -d $'\n')" "+%s")
181181
else
182182
time_prev=${time_check}
183183
fi

0 commit comments

Comments
 (0)