scc

simple c99 compiler
git clone git://git.simple-cc.org/scc
Log | Files | Refs | Submodules | README | LICENSE

commit baf9395306241e466d710d92615c226530ac018c
parent 108a79e6a070b320c7efd64b51b215d3ff73cb7d
Author: Roberto E. Vargas Caballero <k0ga@shike2.net>
Date:   Tue, 14 Apr 2026 18:27:18 +0200

libc/time: Set tm_zone to UTC in gmtime()

Despite of the name of the function gmtime() it is specified to converts
the time_t parameter to a UTC break down calendar time, what makes sense
because GMT is equivalent to UTC but it is (or it can be) affected by
daylight time saving adjustments.

Diffstat:
Msrc/libc/time/gmtime.c | 2+-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/libc/time/gmtime.c b/src/libc/time/gmtime.c @@ -32,7 +32,7 @@ gmtime(const time_t *tim) tm.tm_mday = day + 1; tm.tm_isdst = 0; - tm.tm_zone = "GMT"; + tm.tm_zone = "UTC"; tm.tm_gmtoff = 0; return &tm;