From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtp.gentoo.org (woodpecker.gentoo.org [140.211.166.183]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 4C9B2158128 for ; Wed, 18 Jun 2025 09:52:05 +0000 (UTC) Received: from lists.gentoo.org (bobolink.gentoo.org [140.211.166.189]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange x25519) (No client certificate requested) (Authenticated sender: relay-lists.gentoo.org@gentoo.org) by smtp.gentoo.org (Postfix) with ESMTPSA id 393D3341CDA for ; Wed, 18 Jun 2025 09:52:05 +0000 (UTC) Received: from bobolink.gentoo.org (localhost [127.0.0.1]) by bobolink.gentoo.org (Postfix) with ESMTP id 3148D1104D9; Wed, 18 Jun 2025 09:52:04 +0000 (UTC) Received: from smtp.gentoo.org (woodpecker.gentoo.org [140.211.166.183]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange x25519) (No client certificate requested) by bobolink.gentoo.org (Postfix) with ESMTPS id 25A5D1104D9 for ; Wed, 18 Jun 2025 09:52:04 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange x25519) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id CF9A6340D02 for ; Wed, 18 Jun 2025 09:52:03 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 7268229F4 for ; Wed, 18 Jun 2025 09:52:02 +0000 (UTC) From: "Sam James" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Sam James" Message-ID: <1750240317.f34939f39f4bc40ce331a5a902cbe937465866c5.sam@gentoo> Subject: [gentoo-commits] proj/portage:master commit in: bin/ X-VCS-Repository: proj/portage X-VCS-Files: bin/emerge-webrsync X-VCS-Directories: bin/ X-VCS-Committer: sam X-VCS-Committer-Name: Sam James X-VCS-Revision: f34939f39f4bc40ce331a5a902cbe937465866c5 X-VCS-Branch: master Date: Wed, 18 Jun 2025 09:52:02 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: 28b1d999-aec3-46a7-98d7-9ce56bd69244 X-Archives-Hash: b87952625be3496638a3b9c16422dc9b commit: f34939f39f4bc40ce331a5a902cbe937465866c5 Author: Kerin Millar plushkava net> AuthorDate: Wed Jun 18 02:40:33 2025 +0000 Commit: Sam James gentoo org> CommitDate: Wed Jun 18 09:51:57 2025 +0000 URL: https://gitweb.gentoo.org/proj/portage.git/commit/?id=f34939f3 emerge-webrsync: rename get_unixtime_from_string() to get_unixtime_by_date() The new name better reflects the behaviour of the function. Signed-off-by: Kerin Millar plushkava.net> Signed-off-by: Sam James gentoo.org> bin/emerge-webrsync | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/bin/emerge-webrsync b/bin/emerge-webrsync index 719965e302..459427a152 100755 --- a/bin/emerge-webrsync +++ b/bin/emerge-webrsync @@ -169,15 +169,15 @@ do_tar() { } } -get_unixtime_from_string() { - local s=$1 +get_unixtime_by_date() { + local date=$1 if [[ ${USERLAND} == BSD ]] ; then # 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" + date -juf "%Y%m%d%H%M.%S" "${date}0000.00" +"%s" else - date -d "${s:0:4}-${s:4:2}-${s:6:2}" -u +"%s" + date -d "${date:0:4}-${date:4:2}-${date:6:2}" -u +"%s" fi } @@ -511,7 +511,7 @@ do_snapshot() { have_files=0 fi else - unixtime=$(get_unixtime_from_string "${date}") + unixtime=$(get_unixtime_by_date "${date}") # Check that this snapshot is what the age it claims to be if [[ ${snapshot_timestamp} -lt ${unixtime} || \ @@ -568,7 +568,7 @@ do_latest_snapshot() { fi printf -v snapshot_date '%(%Y%m%d)T' "${start_time}" - snapshot_unixtime=$(get_unixtime_from_string "${snapshot_date}") + snapshot_unixtime=$(get_unixtime_by_date "${snapshot_date}") while (( attempts++ < 40 )); do (( snapshot_unixtime -= 86400 ))