diff options
Diffstat (limited to 'newlib/libc/time/gmtime_r.c')
-rw-r--r-- | newlib/libc/time/gmtime_r.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/newlib/libc/time/gmtime_r.c b/newlib/libc/time/gmtime_r.c index fb39238d3..7afa021c5 100644 --- a/newlib/libc/time/gmtime_r.c +++ b/newlib/libc/time/gmtime_r.c @@ -3,12 +3,15 @@ */ #include <time.h> -#include "local.h" + +#define _GMT_OFFSET 0 struct tm * _DEFUN (gmtime_r, (tim_p, res), _CONST time_t * tim_p _AND struct tm *res) { - return (_mktm_r (tim_p, res, 1)); + time_t tim = *tim_p + _GMT_OFFSET; + + return (localtime_r (&tim, res)); } |