]> git.ipfire.org Git - thirdparty/pdns.git/commitdiff
silence array warning
authorbert hubert <bert.hubert@netherlabs.nl>
Tue, 4 Jun 2013 13:07:07 +0000 (15:07 +0200)
committerPeter van Dijk <peter.van.dijk@netherlabs.nl>
Mon, 10 Jun 2013 07:03:15 +0000 (09:03 +0200)
pdns/unix_utility.cc

index 507b43132466cfde5e60a345edd279e60ff3bc31..862e0587d853ff87c99536f703c870ee07979e8f 100644 (file)
@@ -237,7 +237,7 @@ time_t Utility::timegm(struct tm *const t)
   if (t->tm_sec>60) { t->tm_min += t->tm_sec/60; t->tm_sec%=60; }
   if (t->tm_min>60) { t->tm_hour += t->tm_min/60; t->tm_min%=60; }
   if (t->tm_hour>60) { t->tm_mday += t->tm_hour/60; t->tm_hour%=60; }
-  if (t->tm_mon>12) { t->tm_year += t->tm_mon/12; t->tm_mon%=12; }
+  if (t->tm_mon>11) { t->tm_year += t->tm_mon/12; t->tm_mon%=12; }
  
   while (t->tm_mday>spm[1+t->tm_mon]) {
     if (t->tm_mon==1 && isleap(t->tm_year+1900)) {