Welcome to mirror list, hosted at ThFree Co, Russian Federation.

cygwin.com/git/newlib-cygwin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'newlib/libc/time/gmtime.c')
-rw-r--r--newlib/libc/time/gmtime.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/newlib/libc/time/gmtime.c b/newlib/libc/time/gmtime.c
index d8e687559..4f5bbe403 100644
--- a/newlib/libc/time/gmtime.c
+++ b/newlib/libc/time/gmtime.c
@@ -59,8 +59,9 @@ struct tm *
_DEFUN (gmtime, (tim_p),
_CONST time_t * tim_p)
{
- _REENT_CHECK_TM(_REENT);
- return gmtime_r (tim_p, (struct tm *)_REENT_TM(_REENT));
+ time_t tim = *tim_p + _GMT_OFFSET;
+
+ return (localtime (&tim));
}
#endif