summaryrefslogtreecommitdiff
path: root/lib/getdate.y
diff options
context:
space:
mode:
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 ();