From fae8b8505c7a4c2202d79619b482ff6b70490bf7 Mon Sep 17 00:00:00 2001 From: Jim Meyering Date: Mon, 15 Mar 2004 08:37:03 +0000 Subject: [PATCH] `date --date="21:04 +0100" +%S' would print the seconds value from the current time, rather than `00'. For a date string like `10:23 +0100', set the number of seconds to zero. Reported by Marc Haber. --- lib/getdate.y | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/getdate.y b/lib/getdate.y index 40fd4e0fe4..7725908a09 100644 --- a/lib/getdate.y +++ b/lib/getdate.y @@ -1,6 +1,6 @@ %{ /* Parse a string into an internal time stamp. - Copyright (C) 1999, 2000, 2002, 2003 Free Software Foundation, Inc. + Copyright (C) 1999, 2000, 2002, 2003, 2004 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -220,6 +220,7 @@ time: { PC.hour = $1.value; PC.minutes = $3.value; + PC.seconds = 0; PC.meridian = MER24; PC.zones_seen++; PC.time_zone = $4.value % 100 + ($4.value / 100) * 60; -- 2.47.2