diff options
| author | Jakob Kaivo <jkk@ung.org> | 2024-01-31 16:52:42 -0500 |
|---|---|---|
| committer | Jakob Kaivo <jkk@ung.org> | 2024-01-31 16:52:42 -0500 |
| commit | 421cc9cd7295e5b92cf167a41bd8f55a3b842728 (patch) | |
| tree | 1f9a34ab6409073937e4eeb0a2eff84aaf0da604 /src/time/tzset.c | |
| parent | cb7967b40d4a9b6e17003b8518c7cd49d29108ab (diff) | |
remove POSIX-specific functions
Diffstat (limited to 'src/time/tzset.c')
| -rw-r--r-- | src/time/tzset.c | 45 |
1 files changed, 0 insertions, 45 deletions
diff --git a/src/time/tzset.c b/src/time/tzset.c deleted file mode 100644 index cbc94968..00000000 --- a/src/time/tzset.c +++ /dev/null @@ -1,45 +0,0 @@ -#include <time.h> -#include <stdlib.h> -#include <string.h> -#include "_time.h" -#include "_safety.h" - -void tzset(void) -{ - SIGNAL_SAFE(0); - - char buf[TZNAMELEN * 3]; /* one for std, one for dst, plus dst rule */ - char *tzstr = getenv("TZ"); - if (tzstr == NULL) { - tzstr = "UTC0"; - } - - if (strlen(tzstr) > sizeof(buf)) { - return; - } - - tzname[0] = __time.stdtz; - tzname[1] = __time.dsttz; - strcpy(tzname[0], tzstr); - - /* TODO: - no spaces in actual string - - stdname hh[:mm[:ss]] [dstname [hh[:mm[:ss]]] [,start[/time],end[/time]] - - stdname and dstname are either - all isalpha() - '<' [[:alnum:]+-]* '>' - - hh may be prefixed by + or - - */ - - #ifdef _XOPEN_SOURCE - /* TODO */ - daylight = 0; - #endif -} - -/* -POSIX(1) -*/ |
