From owner-freebsd-questions@freebsd.org Sun Nov 3 12:03:42 2019 Return-Path: Delivered-To: freebsd-questions@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 2E80D1B2BC7 for ; Sun, 3 Nov 2019 12:03:42 +0000 (UTC) (envelope-from mj-mailinglist@gmx.de) Received: from mout.gmx.net (mout.gmx.net [212.227.15.19]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "mout.gmx.net", Issuer "TeleSec ServerPass Class 2 CA" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 475ZMc5CKsz443j for ; Sun, 3 Nov 2019 12:03:40 +0000 (UTC) (envelope-from mj-mailinglist@gmx.de) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1572782605; bh=Efabk57/m9rZwH1DooFaFmGspjOgaznxdAE075fkW08=; h=X-UI-Sender-Class:From:To:Subject:Date; b=klIgqnlo3x6fsZPppW3o1+yKV+c/bMTQMW+cngWqgqdVOqXE55E4G4PPNJGo6cp6O kx8MnuacAr0PK6YMtAKZWtv+22kewCzj2j5ZhQ4PIKJCtwGV3tHR1LT03FlDMgNsxo U/fZ9GlyVqBz/eugyIBHCHGspyS9dzK3E4pldP20= X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c Received: from [89.244.191.59] ([89.244.191.59]) by web-mail.gmx.net (3c-app-gmx-bs36.server.lan [172.19.170.88]) (via HTTP); Sun, 3 Nov 2019 13:03:25 +0100 MIME-Version: 1.0 Message-ID: From: mj-mailinglist@gmx.de To: freebsd-questions@freebsd.org Subject: How to convert svn repository change date to epoch timestamp? Content-Type: text/plain; charset=UTF-8 Date: Sun, 3 Nov 2019 13:03:25 +0100 Importance: normal Sensitivity: Normal X-Priority: 3 X-Provags-ID: V03:K1:pMnrfq6x6/cMFA221m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daUzuU= X-Rspamd-Queue-Id: 475ZMc5CKsz443j X-Spamd-Bar: / Authentication-Results: mx1.freebsd.org; dkim=pass header.d=gmx.net header.s=badeba3b8450 header.b=klIgqnlo; dmarc=none; spf=pass (mx1.freebsd.org: domain of mj-mailinglist@gmx.de designates 212.227.15.19 as permitted sender) smtp.mailfrom=mj-mailinglist@gmx.de X-Spamd-Result: default: False [-1.00 / 15.00]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-0.996,0]; R_DKIM_ALLOW(-0.20)[gmx.net:s=badeba3b8450]; RCVD_TLS_LAST(0.00)[]; R_SPF_ALLOW(-0.20)[+ip4:212.227.15.0/25]; FREEMAIL_FROM(0.00)[gmx.de]; MIME_GOOD(-0.10)[text/plain]; TO_DN_NONE(0.00)[]; DMARC_NA(0.00)[gmx.de]; RCVD_COUNT_TWO(0.00)[2]; RCPT_COUNT_ONE(0.00)[1]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; IP_SCORE_FREEMAIL(0.00)[]; IP_SCORE(0.00)[ip: (-6.51), ipnet: 212.227.0.0/16(-1.34), asn: 8560(2.28), country: DE(-0.01)]; TO_MATCH_ENVRCPT_ALL(0.00)[]; DKIM_TRACE(0.00)[gmx.net:+]; FROM_NO_DN(0.00)[]; HAS_X_PRIO_THREE(0.00)[3]; RECEIVED_SPAMHAUS_PBL(0.00)[59.191.244.89.khpj7ygk5idzvmvt5x4ziurxhy.zen.dq.spamhaus.net : 127.0.0.10]; SUBJECT_ENDS_QUESTION(1.00)[]; MID_RHS_NOT_FQDN(0.50)[]; ASN(0.00)[asn:8560, ipnet:212.227.0.0/16, country:DE]; MIME_TRACE(0.00)[0:+]; FREEMAIL_ENVFROM(0.00)[gmx.de]; FROM_EQ_ENVFROM(0.00)[] X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 03 Nov 2019 12:03:42 -0000 Hi, I am trying to convert the output of this command svnlite info --show-item last-changed-date /usr/src/ to an epoch timestamp with base tools. The output looks like this: 2019-11-03T07:11:09.005639Z The date man page gives this example for converting dates: date -j -f "%a %b %d %T %Z %Y" "`date`" "+%s" (maybe add the info, that you have to use LC_TIME=C for this example to work) I came up with this date format string "%Y-%m-%dT%H:%M:%SZ" but this lacks the fractions part of the seconds. Is this possible with the tools in base? Or maybe i could chop of the second-fractions? -- Martin