29 lines
532 B
C
29 lines
532 B
C
#include "proto/exec.h"
|
|
#include "compiler.h"
|
|
#include "time_tm.h"
|
|
#include "time_header.h"
|
|
|
|
int main(const int argc, char *argv[])
|
|
{
|
|
timezone_t tz = NULL;
|
|
time_t now ;
|
|
char *ret;
|
|
|
|
ret = (char*)allocmem(256);
|
|
if(GetVar((STRPTR)TZVARIABLE, (STRPTR)ret, 256 - 1, 0) == -1) {
|
|
strcpy(ret, "unknown");
|
|
tz = tzalloc(0);
|
|
} else {
|
|
tz = tzalloc(ret);
|
|
underscore_remove(ret);
|
|
}
|
|
|
|
if (tz) {
|
|
printf("Good", tz);
|
|
tzfree(tz);
|
|
}
|
|
|
|
freemem(ret);
|
|
return 0;
|
|
}
|