From: [EMAIL PROTECTED] Subject: bug - sec_to_time has a low upper limit on the range
Description: sec_to_time will not return times greater than 24, my hunch is that sec_to_time() is wrapping at 24:00 for some reason or that's some kind of bound, and it's not sticking to the TIME type which has a documented range of -838:.. to 838 hours. How-To-Repeat: run this query: select sec_to_time(10.5*60*60), sec_to_time(18*60*60), sec_to_time(22*60*60), sec_to_time(23*60*60), sec_to_time(24*60*60), sec_to_time(24.5*60*60), sec_to_time(24.999*60*60), sec_to_time(26*60*60), sec_to_time(35*60*60), (35*60*60)/60/60 you should see 10:30:00, 18:00:00, 22:00:00, 23:00:00, 23:00:00, 24:30:00, 24:59:56, 26:00:00, 35:00:00, 35 but what you do get: 10:30:00, 18:00:00, 22:00:00, 23:00:00, 23:00:00, 23:30:00, 23:59:56, 23:00:00, 23:00:00, 35 Fix: well you can get the correct hours as decimal (by just doing the /60/60 instead of the sec_to_time conversion, like the last one) and construct a time string from that using your program, but i like to make my DB server do the leg work... also if you do /3600 instead of /60/60 you get fewer decimal places; isn't that a bit bug-ish as well? it's truly less accurate, we lose seconds that way. thanks for your time&effort! hope i've been clear, please email any questions back to me. Synopsis: bug - sec_to_time has a low upper limit on the range Submitter-Id: ?? Originator: Brian Bittman Organization: Bock Interactive, Inc. MySQL support: none Severity: non-critical Priority: low Category: mysqld Class: sw-bug | doc-bug Release: 4.0.11-gamma Exectutable: mysqld Environment: Linux System: RedHat 7.3 Compiler: rpms Architecture: i - Brian Bittman [EMAIL PROTECTED] --------------------------------------------------------------------- Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail <[EMAIL PROTECTED]> To unsubscribe, e-mail <[EMAIL PROTECTED]> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php