summaryrefslogtreecommitdiff
path: root/lib/getdate.y
diff options
context:
space:
mode:
authorJim Meyering <jim@meyering.net>1995-01-27 05:22:23 +0000
committerJim Meyering <jim@meyering.net>1995-01-27 05:22:23 +0000
commitb554fee4014e41b73937931d95d6174de4cc5c01 (patch)
tree515d4af89e4d0c7bbdd66af4669c68c335cfe939 /lib/getdate.y
parent293530a4c8bceea8fc6c96fef3b4356538cf82a2 (diff)
downloadcoreutils-b554fee4014e41b73937931d95d6174de4cc5c01.tar.xz
.
Diffstat (limited to 'lib/getdate.y')
-rw-r--r--lib/getdate.y4
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/getdate.y b/lib/getdate.y
index 77d63a9e9..8f0872d72 100644
--- a/lib/getdate.y
+++ b/lib/getdate.y
@@ -585,10 +585,14 @@ ToSeconds (Hours, Minutes, Seconds, Meridian)
case MERam:
if (Hours < 1 || Hours > 12)
return -1;
+ if (Hours == 12)
+ Hours = 0;
return (Hours * 60L + Minutes) * 60L + Seconds;
case MERpm:
if (Hours < 1 || Hours > 12)
return -1;
+ if (Hours == 12)
+ Hours = 0;
return ((Hours + 12) * 60L + Minutes) * 60L + Seconds;
default:
abort ();