mirror of
https://github.com/pentoo/pentoo-overlay
synced 2025-12-06 08:25:01 +01:00
pentoo-update: normalize date format
This commit is contained in:
parent
b6783bd2ea
commit
f15e41be1d
1 changed files with 2 additions and 2 deletions
|
|
@ -188,8 +188,8 @@ safe_exit() {
|
|||
do_sync() {
|
||||
|
||||
read -r portage_timestamp < /usr/portage/metadata/timestamp.chk
|
||||
portage_date=`date --date="$portage_timestamp" '+%Y%m%d%H%M'`
|
||||
minutesDiff=$(( `date '+%Y%m%d%H%M'` - $portage_date ))
|
||||
portage_date=`date --date="$portage_timestamp" '+%Y%m%d%H%M' -u`
|
||||
minutesDiff=$(( `date '+%Y%m%d%H%M' -u` - $portage_date ))
|
||||
if [ $minutesDiff -lt 60 ]
|
||||
then
|
||||
echo "The last sync was lesser then 1 hour ago, skipping"
|
||||
|
|
|
|||
Loading…
Reference in a new issue