version 1.7, 2003/07/01 01:01:28 |
version 1.8, 2008/06/19 19:16:04 |
|
|
int |
int |
atot(char *p, time_t *store) |
atot(char *p, time_t *store) |
{ |
{ |
static struct tm *lt; |
|
struct tm tm; |
struct tm tm; |
time_t tval; |
time_t tval; |
char *t; |
char *t; |
|
|
if (!*p) { |
if (!*p) { |
*store = 0; |
*store = 0; |
return (0); |
return (0); |
} |
|
if (!lt) { |
|
unsetenv("TZ"); |
|
(void)time(&tval); |
|
lt = localtime(&tval); |
|
} |
} |
(void) memset(&tm, 0, sizeof(tm)); |
(void) memset(&tm, 0, sizeof(tm)); |
for (t = p; (t = strchr(t, ',')) != NULL; t++) |
for (t = p; (t = strchr(t, ',')) != NULL; t++) |