Changeset 331 for EcnlProtoTool/trunk/ntshell/fatfs/fftime.c
- Timestamp:
- Jan 21, 2018, 12:10:09 AM (6 years ago)
- File:
-
- 1 moved
Legend:
- Unmodified
- Added
- Removed
-
EcnlProtoTool/trunk/ntshell/fatfs/fftime.c
r330 r331 30 30 #include "ff.h" 31 31 32 int shell_errno; 33 32 34 /* 2000-03-01 (mod 400 year, immediately after feb29 */ 33 35 #define LEAPOCH (946684800LL + 86400*(31+29)) … … 200 202 * __secs_to_zone cannot safely handle them. */ 201 203 if (*t < INT_MIN * 31622400LL || *t > INT_MAX * 31622400LL) { 202 errno = EOVERFLOW;204 shell_errno = EOVERFLOW; 203 205 return 0; 204 206 } 205 207 //TODO:__secs_to_zone(*t, 0, &tm->tm_isdst, &tm->__tm_gmtoff, 0, &tm->__tm_zone); 206 208 if (__secs_to_tm((long long)*t /*+ tm->__tm_gmtoff*/, tm) < 0) { 207 errno = EOVERFLOW;209 shell_errno = EOVERFLOW; 208 210 return 0; 209 211 } … … 220 222 { 221 223 if (__secs_to_tm(*t, tm) < 0) { 222 errno = EOVERFLOW;224 shell_errno = EOVERFLOW; 223 225 return 0; 224 226 } … … 249 251 250 252 error: 251 errno = EOVERFLOW;253 shell_errno = EOVERFLOW; 252 254 return -1; 253 255 } … … 258 260 struct tm _tm; 259 261 260 t ime(&temp);262 temp = rtc_read(); 261 263 gmtime_r(&temp, &_tm); 262 264
Note:
See TracChangeset
for help on using the changeset viewer.