From 6335dbb5e1cf694afea3c306012a258614d13880 Mon Sep 17 00:00:00 2001 From: Seth Hall Date: Wed, 18 Jul 2012 11:32:14 -0400 Subject: [PATCH] Fixing calc_next_rotate to use UTC based time functions. --- src/util.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/util.cc b/src/util.cc index 3cfa5fca1c..abbea3e906 100644 --- a/src/util.cc +++ b/src/util.cc @@ -1112,9 +1112,9 @@ double calc_next_rotate(double current, double interval, double base) time_t teatime = time_t(current); struct tm t; - t = *localtime_r(&teatime, &t); + t = *gmtime_r(&teatime, &t); t.tm_hour = t.tm_min = t.tm_sec = 0; - double startofday = mktime(&t); + double startofday = timegm(&t); if ( base < 0 ) // No base time given. To get nice timestamps, we round