☰
Debian Codegraph
@
0.0~git20260129.ec0effd-3
0.0~git20260129.ec0effd-2
/
/
libc-top-half
/
musl
/
compat
/
time32
/
time32gm.c
☽
☼
libc-top-half/musl/compat/time32/time32gm.c
code
plain
raw
MIT
2005-2019 Rich Felker <
[email protected]
>; 2005-2019 Many other contributors
debian/copyright
1
#define _GNU_SOURCE
2
#include "time32.h"
3
#include <time.h>
4
#include <errno.h>
5
#include <stdint.h>
6
7
time32_t __time32gm(struct tm *tm)
8
{
9
time_t t = timegm(tm);
10
if (t < INT32_MIN || t > INT32_MAX) {
11
errno = EOVERFLOW;
12
return -1;
13
}
14
return t;
15
}