From: Peter van Dijk Date: Thu, 15 Aug 2013 20:30:42 +0000 (+0200) Subject: explain why we have gmtime_r X-Git-Tag: rec-3.6.0-rc1~517 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=92e1022e488217c5fdef044843f49d1e7fc489a1;p=thirdparty%2Fpdns.git explain why we have gmtime_r --- diff --git a/pdns/unix_utility.cc b/pdns/unix_utility.cc index 7655ffbd65..2279e6139d 100644 --- a/pdns/unix_utility.cc +++ b/pdns/unix_utility.cc @@ -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};