parse-time-string: fix setting and rounding of seconds
authorJani Nikula <jani@nikula.org>
Mon, 2 Mar 2015 17:47:04 +0000 (19:47 +0200)
committerDavid Bremner <david@tethera.net>
Sat, 7 Mar 2015 09:20:33 +0000 (10:20 +0100)
commit6aeef2ee15d16a0376f5bad8309a1da99fb73004
tree93462fc0e638d87201f03fd88479da38021af650
parent952f46fedc0d385650e00ad739814a0127e13fa1
parse-time-string: fix setting and rounding of seconds

If seconds are not specified in the string to be parsed, they're not
set according to the reference time (in the no rounding case) nor
rounded properly (in the rounding up cases). Fix this.

The bug caused searches such as date:10:30..10:30 to match messages
with date exactly 10:30:00 only, and not in range 10:30:00..10:30:59
(inclusive) as documented.

Note that date searches referring "noon" or "5pm" will still be
interpreted as exact to the second.
parse-time-string/parse-time-string.c
test/T490-parse-time-string.sh