From: Zac Medico Date: Sun, 19 Aug 2012 04:03:11 +0000 (-0700) Subject: emerge-webrsync: fix date usage for BSD X-Git-Tag: v2.2.0_alpha122~12 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=f55d7ef2b68e42e46e1ddc5747e7e3a75b7e6869;p=portage.git emerge-webrsync: fix date usage for BSD --- diff --git a/bin/emerge-webrsync b/bin/emerge-webrsync index 5cba6b045..a962ab548 100755 --- a/bin/emerge-webrsync +++ b/bin/emerge-webrsync @@ -101,7 +101,9 @@ get_date_part() { get_utc_second_from_string() { local s="$1" if [[ ${USERLAND} == BSD ]] ; then - date -juf "%Y%m%d" "$s" +"%s" + # Specify zeros for the least significant digits, or else those + # digits are inherited from the current system clock time. + date -juf "%Y%m%d%H%M.%S" "${s}0000.00" +"%s" else date -d "${s:0:4}-${s:4:2}-${s:6:2}" -u +"%s" fi