version 1.23, 2010/04/28 18:20:15 |
version 1.26, 2013/11/12 19:35:47 |
|
|
static struct fixs fnmonths[13]; /* full national months names */ |
static struct fixs fnmonths[13]; /* full national months names */ |
static struct fixs nmonths[13]; /* short national month names */ |
static struct fixs nmonths[13]; /* short national month names */ |
|
|
|
|
void |
void |
setnnames(void) |
setnnames(void) |
{ |
{ |
|
|
len = strlen(date); |
len = strlen(date); |
if (len < 2) |
if (len < 2) |
return((time_t)-1); |
return((time_t)-1); |
|
bzero(&tm, sizeof tm); |
tm.tm_sec = 0; |
tm.tm_sec = 0; |
tm.tm_min = 0; |
tm.tm_min = 0; |
/* Avoid getting caught by a timezone shift; set time to noon */ |
/* Avoid getting caught by a timezone shift; set time to noon */ |
|
|
} |
} |
|
|
#if DEBUG |
#if DEBUG |
printf("Mktime: %d %d %d %s\n", (int)mktime(&tm), (int)t, len, |
printf("Mktime: %d %lld %d %s\n", (int)mktime(&tm), (long long)t, len, |
asctime(&tm)); |
asctime(&tm)); |
#endif |
#endif |
return(mktime(&tm)); |
return(mktime(&tm)); |
} |
} |
|
|
void |
static void |
adjust_calendar(int *day, int *month) |
adjust_calendar(int *day, int *month) |
{ |
{ |
switch (calendar) { |
switch (calendar) { |