]> granicus.if.org Git - pgbouncer/commitdiff
locatime weirdness wasnt windows specific...
authorMarko Kreen <markokr@gmail.com>
Sat, 6 Dec 2008 23:33:27 +0000 (23:33 +0000)
committerMarko Kreen <markokr@gmail.com>
Sat, 6 Dec 2008 23:33:27 +0000 (23:33 +0000)
src/util.c
win32/win32support.h

index bcc19b604d1bdd6f8e6e480dcd68d3bc477d14fc..6d558315f4e9bb0ae15835af6cd58f1a7f65d0ee 100644 (file)
@@ -70,7 +70,7 @@ static void render_time(char *buf, int max)
        gettimeofday(&tv, NULL);
        tm = localtime(&tv.tv_sec);
        snprintf(buf, max, "%04d-%02d-%02d %02d:%02d:%02d.%03d",
-                tm->tm_year, tm->tm_mon, tm->tm_mday,
+                tm->tm_year + 1900, tm->tm_mon + 1, tm->tm_mday,
                 tm->tm_hour, tm->tm_min, tm->tm_sec,
                 (int)(tv.tv_usec / 1000));
 }
index df00460e7b3ede5c71253158967d5aacf8014ce2..3140004ca1726f21b637f20cf301105afda3294e 100644 (file)
@@ -238,17 +238,6 @@ struct passwd {
 };
 static inline const struct passwd * getpwnam(const char *u) { return NULL; }
 
-/* fix localtime */
-static inline struct tm *w_localtime(const time_t *timep) {
-       struct tm *res = localtime(timep);
-       if (res) {
-               res->tm_year += 1900;
-               res->tm_mon += 1;
-       }
-       return res;
-}
-#define localtime(a) w_localtime(a)
-
 /*
  * fcntl
  */