@@ -49,11 +49,11 @@ #ifdef HAVE_GMTIME_R # define GMTIME_RET(field) \ time_t seconds = (time_t)_seconds; \ struct tm tm; \ \ - if (seconds != floor(_seconds)) \ + if (seconds != trunc(_seconds)) \ @throw [OFOutOfRangeException exception]; \ \ if (gmtime_r(&seconds, &tm) == NULL) \ @throw [OFOutOfRangeException exception]; \ \ @@ -60,11 +60,11 @@ return tm.field; # define LOCALTIME_RET(field) \ time_t seconds = (time_t)_seconds; \ struct tm tm; \ \ - if (seconds != floor(_seconds)) \ + if (seconds != trunc(_seconds)) \ @throw [OFOutOfRangeException exception]; \ \ if (localtime_r(&seconds, &tm) == NULL) \ @throw [OFOutOfRangeException exception]; \ \ @@ -73,11 +73,11 @@ # ifdef OF_HAVE_THREADS # define GMTIME_RET(field) \ time_t seconds = (time_t)_seconds; \ struct tm *tm; \ \ - if (seconds != floor(_seconds)) \ + if (seconds != trunc(_seconds)) \ @throw [OFOutOfRangeException exception]; \ \ [mutex lock]; \ \ @try { \ @@ -90,11 +90,11 @@ } # define LOCALTIME_RET(field) \ time_t seconds = (time_t)_seconds; \ struct tm *tm; \ \ - if (seconds != floor(_seconds)) \ + if (seconds != trunc(_seconds)) \ @throw [OFOutOfRangeException exception]; \ \ [mutex lock]; \ \ @try { \ @@ -108,11 +108,11 @@ # else # define GMTIME_RET(field) \ time_t seconds = (time_t)_seconds; \ struct tm *tm; \ \ - if (seconds != floor(_seconds)) \ + if (seconds != trunc(_seconds)) \ @throw [OFOutOfRangeException exception]; \ \ if ((tm = gmtime(&seconds)) == NULL) \ @throw [OFOutOfRangeException exception]; \ \ @@ -119,11 +119,11 @@ return tm->field; # define LOCALTIME_RET(field) \ time_t seconds = (time_t)_seconds; \ struct tm *tm; \ \ - if (seconds != floor(_seconds)) \ + if (seconds != trunc(_seconds)) \ @throw [OFOutOfRangeException exception]; \ \ if ((tm = localtime(&seconds)) == NULL) \ @throw [OFOutOfRangeException exception]; \ \ @@ -499,11 +499,11 @@ return [ret autorelease]; } - (uint32_t)microsecond { - return (uint32_t)((_seconds - floor(_seconds)) * 1000000); + return (uint32_t)((_seconds - trunc(_seconds)) * 1000000); } - (uint8_t)second { GMTIME_RET(tm_sec) @@ -589,11 +589,11 @@ char *buffer; #else wchar_t *buffer; #endif - if (seconds != floor(_seconds)) + if (seconds != trunc(_seconds)) @throw [OFOutOfRangeException exception]; #ifdef HAVE_GMTIME_R if (gmtime_r(&seconds, &tm) == NULL) @throw [OFOutOfRangeException exception]; @@ -649,11 +649,11 @@ char *buffer; #else wchar_t *buffer; #endif - if (seconds != floor(_seconds)) + if (seconds != trunc(_seconds)) @throw [OFOutOfRangeException exception]; #ifdef HAVE_LOCALTIME_R if (localtime_r(&seconds, &tm) == NULL) @throw [OFOutOfRangeException exception];