`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.
This commit is contained in:
Jim Meyering committed 2004-03-15 08:37:03 +00:00
1 parent b9ccb4b8e8
commit fae8b8505c
1 file changed
+2 -1
+2 -1
View File
@@ -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;