source: azure_iot_hub/trunk/musl-1.1.18/src/time/timegm.c@ 388

Last change on this file since 388 was 388, checked in by coas-nagasima, 5 years ago

Azure IoT Hub Device C SDK を使ったサンプルの追加

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
  • Property svn:mime-type set to text/x-csrc
File size: 332 bytes
Line 
1#define _GNU_SOURCE
2#include "time_impl.h"
3#include <errno.h>
4
5extern const char __gmt[];
6
7time_t timegm(struct tm *tm)
8{
9 struct tm new;
10 long long t = __tm_to_secs(tm);
11 if (__secs_to_tm(t, &new) < 0) {
12 errno = EOVERFLOW;
13 return -1;
14 }
15 *tm = new;
16 tm->tm_isdst = 0;
17 tm->__tm_gmtoff = 0;
18 tm->__tm_zone = __gmt;
19 return t;
20}
Note: See TracBrowser for help on using the repository browser.