summaryrefslogtreecommitdiff
path: root/userland/libc/time/localtime.c
blob: ce15ffb12e61a566a81c6afcbd72f7f3a76fb05f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
#include <time.h>

struct tm localtime_r = {
    .tm_sec = 0,
    .tm_min = 0,
    .tm_hour = 0,
    .tm_mday = 0,
    .tm_mon = 0,
    .tm_year = 0,
    .tm_wday = 0,
    .tm_yday = 0,
    .tm_isdst = 0,
    .__tm_gmtoff = 0,
    .__tm_zone = 0,
};

// https://pubs.opengroup.org/onlinepubs/9699919799/functions/localtime.html
struct tm *localtime(const time_t *timer) {
  (void)timer;
  // TODO: Implement
  return &localtime_r;
}