diff options
author | cinap_lenrek <cinap_lenrek@felloff.net> | 2020-06-15 00:12:57 +0200 |
---|---|---|
committer | cinap_lenrek <cinap_lenrek@felloff.net> | 2020-06-15 00:12:57 +0200 |
commit | febe84af755d8b6941c6e59c1b350f889c4fccb0 (patch) | |
tree | 45cb13daa2c1ef116613a7e461e0c59fda1d5bd6 /sys/include/libc.h | |
parent | 8b3efcfc4e3b38eab3f0ff503e573c072ff890f5 (diff) |
libc: revert date change again. this is getting ridicuoulus.
this breaks the sample from the seconds manpage, and overall
produces funky results. this needs alot more testing.
term% seconds '23 may 2011'
seconds: tmparse: invalid date 23 may 2011 near 'may 2011'
term% seconds '2019-01-01 00:00:00'
-118370073600
Diffstat (limited to 'sys/include/libc.h')
-rw-r--r-- | sys/include/libc.h | 43 |
1 files changed, 10 insertions, 33 deletions
diff --git a/sys/include/libc.h b/sys/include/libc.h index 820d684b2..7a2700539 100644 --- a/sys/include/libc.h +++ b/sys/include/libc.h @@ -314,45 +314,22 @@ extern double fmod(double, double); /* * Time-of-day */ -typedef struct Tzone Tzone; -#pragma incomplete Tzone - typedef struct Tm { - vlong abs; /* seconds since Jan 1 1970, GMT */ - int nsec; /* nseconds (range 0...1e9) */ - int sec; /* seconds (range 0..60) */ - int min; /* minutes (0..59) */ - int hour; /* hours (0..23) */ - int mday; /* day of the month (1..31) */ - int mon; /* month of the year (0..11) */ - int year; /* year A.D. */ - int wday; /* day of week (0..6, Sunday = 0) */ - int yday; /* day of year (0..365) */ - char zone[16]; /* time zone name */ - int tzoff; /* time zone delta from GMT */ - Tzone *tz; /* time zone associated with this date */ + int sec; + int min; + int hour; + int mday; + int mon; + int year; + int wday; + int yday; + char zone[4]; + int tzoff; } Tm; -typedef -struct Tmfmt { - char *fmt; - Tm *tm; -} Tmfmt; - -#pragma varargck type "τ" Tmfmt - -extern Tzone* tmgetzone(char *name); -extern Tm* tmnow(Tm*, Tzone*); -extern Tm* tmtime(Tm*, vlong, Tzone*); -extern Tm* tmtimens(Tm*, vlong, int, Tzone*); -extern Tm* tmparse(Tm*, char*, char*, Tzone*); -extern Tm* tmnorm(Tm*); -extern Tmfmt tmfmt(Tm*, char*); -extern void tmfmtinstall(void); - extern Tm* gmtime(long); extern Tm* localtime(long); extern char* asctime(Tm*); |