diff options
author | Rafael Garcia-Suarez <rgarciasuarez@gmail.com> | 2009-03-13 13:15:16 +0100 |
---|---|---|
committer | Rafael Garcia-Suarez <rgarciasuarez@gmail.com> | 2009-03-13 13:15:16 +0100 |
commit | 7a67abdf144958503a96be280e967853af1af745 (patch) | |
tree | 3aab7fb6fcc71a083f42e388dc5244a4482d9949 | |
parent | 05fe29fd3bc243a33acdc8a62bc4ce42df75ca4b (diff) | |
download | perl-7a67abdf144958503a96be280e967853af1af745.tar.gz |
Ignore the decimal part of any floating point argument passed to localtime or gmtime
That way the overload warning won't be emitted for non-overflowing
floating point values.
-rw-r--r-- | pp_sys.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -4464,7 +4464,7 @@ PP(pp_gmtime) using a double causes an unfortunate loss of accuracy on high numbers. What we really need is an SvQV. */ - double input = POPn; + double input = Perl_floor(POPn); when = (Time64_T)input; if (when != input && ckWARN(WARN_OVERFLOW)) { Perl_warner(aTHX_ packWARN(WARN_OVERFLOW), |