summary refs log tree commit diff
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>1998-12-18 10:02:06 +0000
committerUlrich Drepper <drepper@redhat.com>1998-12-18 10:02:06 +0000
commit51c68755af9bf02a88792b8caff9cf516a262684 (patch)
treec05c7a6a758b6c90183d54f4189b62defd977e72
parentff7059bfe84cffa60fcd4d2a45f35a6b8edfffd6 (diff)
downloadglibc-51c68755af9bf02a88792b8caff9cf516a262684.tar.gz
glibc-51c68755af9bf02a88792b8caff9cf516a262684.tar.xz
glibc-51c68755af9bf02a88792b8caff9cf516a262684.zip
Update.
	* time/getdate.c (check_mday): tm_mon contains values from 0 to 11,
	not 1 to 12.
-rw-r--r--ChangeLog3
-rw-r--r--time/getdate.c22
2 files changed, 14 insertions, 11 deletions
diff --git a/ChangeLog b/ChangeLog
index 07f7128de2..356a5d3790 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,8 @@
 1998-12-18  Ulrich Drepper  <drepper@cygnus.com>
 
+	* time/getdate.c (check_mday): tm_mon contains values from 0 to 11,
+	not 1 to 12.
+
 	* manual/texinfo.tex: Update to latest version.
 
 	* sysdeps/unix/sysv/linux/sparc/sparc32/syscalls.list: Add ipc.
diff --git a/time/getdate.c b/time/getdate.c
index eb7b0c7f87..c25a49d5a1 100644
--- a/time/getdate.c
+++ b/time/getdate.c
@@ -71,24 +71,24 @@ check_mday (int year, int mon, int mday)
 {
   switch (mon)
     {
-    case 1:
-    case 3:
-    case 5:
-    case 7:
-    case 8:
-    case 10:
-    case 12:
-      if (mday >= 1 && mday <= 31)
-	return 1;
-      break;
+    case 0:
+    case 2:
     case 4:
     case 6:
+    case 7:
     case 9:
     case 11:
+      if (mday >= 1 && mday <= 31)
+	return 1;
+      break;
+    case 3:
+    case 5:
+    case 8:
+    case 10:
       if (mday >= 1 && mday <= 30)
 	return 1;
       break;
-    case 2:
+    case 1:
       if (mday >= 1 && mday < (__isleap (year) ? 29 : 28))
 	return 1;
       break;