From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from firstgate.proxmox.com (firstgate.proxmox.com [212.224.123.68]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by lists.proxmox.com (Postfix) with ESMTPS id 635C363526 for ; Mon, 14 Feb 2022 19:09:35 +0100 (CET) Received: from firstgate.proxmox.com (localhost [127.0.0.1]) by firstgate.proxmox.com (Proxmox) with ESMTP id 56F12266ED for ; Mon, 14 Feb 2022 19:09:35 +0100 (CET) Received: from proxmox-new.maurer-it.com (proxmox-new.maurer-it.com [94.136.29.106]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by firstgate.proxmox.com (Proxmox) with ESMTPS id B871F266E1 for ; Mon, 14 Feb 2022 19:09:34 +0100 (CET) Received: from proxmox-new.maurer-it.com (localhost.localdomain [127.0.0.1]) by proxmox-new.maurer-it.com (Proxmox) with ESMTP id 82745461FA for ; Mon, 14 Feb 2022 19:09:34 +0100 (CET) Date: Mon, 14 Feb 2022 19:09:33 +0100 From: Stoiko Ivanov To: Wolfgang Bumiller Cc: pmg-devel@lists.proxmox.com Message-ID: <20220214190933.22d928d5@rosa.proxmox.com> In-Reply-To: <20220104135723.111515-1-w.bumiller@proxmox.com> References: <20220104135723.111515-1-w.bumiller@proxmox.com> X-Mailer: Claws Mail 3.17.8 (GTK+ 2.24.33; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-SPAM-LEVEL: Spam detection results: 0 AWL 0.233 Adjusted score from AWL reputation of From: address BAYES_00 -1.9 Bayes spam probability is 0 to 1% KAM_DMARC_STATUS 0.01 Test Rule for DKIM or SPF Failure with Strict Alignment SPF_HELO_NONE 0.001 SPF: HELO does not publish an SPF Record SPF_PASS -0.001 SPF: sender matches SPF record T_SCC_BODY_TEXT_LINE -0.01 - Subject: Re: [pmg-devel] [PATCH log-tracker] drop 'time' dependency X-BeenThere: pmg-devel@lists.proxmox.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: Proxmox Mail Gateway development discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 14 Feb 2022 18:09:35 -0000 applied - with the FIXME comment removed and my R-b, T-b tags added huge thanks again! On Tue, 4 Jan 2022 14:57:23 +0100 Wolfgang Bumiller wrote: > We're using a very old version of it and the functions we > actually use are available in glibc anyway. > > The only difference I found was that the result of > glibc's `strptime()`'s `%s` does *not* want an additional > `.to_local()` call anymore... > > ... which was weird anyway. > > As a minor optimization I pass the format string as `&CStr` > to avoid the memcpy. > > (The CString::new() call in `strptime()` only happens during > parameter parsing) > > Signed-off-by: Wolfgang Bumiller > --- > Cargo.toml | 1 - > src/main.rs | 75 ++++++++--------------- > src/time.rs | 169 ++++++++++++++++++++++++++++++++++++++++++++++++++++ > 3 files changed, 194 insertions(+), 51 deletions(-) > create mode 100644 src/time.rs > > .. snip ...