]> git.ipfire.org Git - thirdparty/pdns.git/commitdiff
explain why we have gmtime_r
authorPeter van Dijk <peter.van.dijk@netherlabs.nl>
Thu, 15 Aug 2013 20:30:42 +0000 (22:30 +0200)
committerPeter van Dijk <peter.van.dijk@netherlabs.nl>
Thu, 15 Aug 2013 20:30:42 +0000 (22:30 +0200)
pdns/unix_utility.cc

index 7655ffbd6507178e053b72f4e45f1804ad7c9efc..2279e6139d082434db268538d781efdafda851ca 100644 (file)
@@ -277,6 +277,8 @@ time_t Utility::timegm(struct tm *const t)
   return ((day + t->tm_hour) * i + t->tm_min) * i + t->tm_sec;
 }
 
+// we have our own gmtime_r because the one in GNU libc violates POSIX/SuS
+// by supporting leap seconds when TZ=right/UTC
 void Utility::gmtime_r(const time_t *timer, struct tm *tmbuf) {
 
   int monthdays[] = {31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31};