susumu.yata
null+****@clear*****
Thu May 15 10:26:04 JST 2014
susumu.yata 2014-05-15 10:26:04 +0900 (Thu, 15 May 2014) New Revision: 864be67f594cc4962daeddd7d28944907b252569 https://github.com/mroonga/mroonga/commit/864be67f594cc4962daeddd7d28944907b252569 Message: Fix a bug that 1969-12-31 23:59:59 UTC (Unix time: -1) causes an error Redmine: fixes #2553 Modified files: lib/mrn_time_converter.cpp Modified: lib/mrn_time_converter.cpp (+2 -1) =================================================================== --- lib/mrn_time_converter.cpp 2014-05-13 10:23:42 +0900 (aa77945) +++ lib/mrn_time_converter.cpp 2014-05-15 10:26:04 +0900 (607c02d) @@ -37,9 +37,10 @@ namespace mrn { time_t TimeConverter::tm_to_time_gm(struct tm *time) { MRN_DBUG_ENTER_METHOD(); struct tm gmdate; + time->tm_yday = -1; time->tm_isdst = -1; time_t sec_t = mktime(time); - if (sec_t == -1) + if (time->tm_yday == -1) DBUG_RETURN(sec_t); gmtime_r(&sec_t, &gmdate); int32 mrn_utc_diff_in_seconds = -------------- next part -------------- HTML����������������������������...下載