version 1.1.2.

This commit is contained in:
Takahiro Itagaki
2010-06-01 07:35:01 +00:00
parent 9bed2e6b2e
commit 79757ccb62
9 changed files with 20 additions and 8 deletions

View File

@ -351,6 +351,7 @@ parse_time(const char *value, time_t *time)
tmp[len] = '\0';
/* parse for "YYYY-MM-DD HH:MI:SS" */
memset(&tm, 0, sizeof(tm));
tm.tm_year = 0; /* tm_year is year - 1900 */
tm.tm_mon = 0; /* tm_mon is 0 - 11 */
tm.tm_mday = 1; /* tm_mday is 1 - 31 */
@ -375,6 +376,9 @@ parse_time(const char *value, time_t *time)
if (i > 1)
tm.tm_mon -= 1;
/* determine whether Daylight Saving Time is in effect */
tm.tm_isdst = -1;
*time = mktime(&tm);
return true;