diff options
author | unknown <jani@ua141d10.elisa.omakaista.fi> | 2006-05-04 19:31:10 +0300 |
---|---|---|
committer | unknown <jani@ua141d10.elisa.omakaista.fi> | 2006-05-04 19:31:10 +0300 |
commit | bcb61e6860ae71cbc7e07cc5c956da1542bf5db8 (patch) | |
tree | 046b31757f6d6f6d3dd1147f95989bc7b9733343 /sql/item_timefunc.cc | |
parent | ac94170069e4de0447fa5b76a1e38a437a66a197 (diff) | |
download | mariadb-git-bcb61e6860ae71cbc7e07cc5c956da1542bf5db8.tar.gz |
Fix for Bug#11326.
mysql-test/r/date_formats.result:
Added test cases for Bug#11326
mysql-test/t/date_formats.test:
Added test cases for Bug#11326
Diffstat (limited to 'sql/item_timefunc.cc')
-rw-r--r-- | sql/item_timefunc.cc | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/sql/item_timefunc.cc b/sql/item_timefunc.cc index f3d6858755c..f26b5aae37a 100644 --- a/sql/item_timefunc.cc +++ b/sql/item_timefunc.cc @@ -620,7 +620,8 @@ bool make_date_time(DATE_TIME_FORMAT *format, TIME *l_time, case 'r': length= my_sprintf(intbuff, (intbuff, - (l_time->hour < 12) ? "%02d:%02d:%02d AM" : "%02d:%02d:%02d PM", + ((l_time->hour % 24) < 12) ? + "%02d:%02d:%02d AM" : "%02d:%02d:%02d PM", (l_time->hour+11)%12+1, l_time->minute, l_time->second)); |