Open
Description
By entering a very small value for the sleep duration, such as 0.001 (which seems to be the point at which it gets rounded down), the sleep entry gets added with a duration of 0 hours, which makes it possible to technically exceed the 24-hour limit placed on total sleep time in a day by an extra 0.001 hours at least once before the program catches it.
Steps to replicate:
- sleep add 23.50 d/2024-04-17, which adds a sleep entry with time 23.5 hours
- sleep add 0.49 d/2024-04-17, which adds 0.49hrs
3.sleep add 0.01 d/2024-04-17, which adds 0.01hrs, bringing the total to 24 hours. - sleep add 0.001 d/2024-04-17, which adds an additional 0.001 hrs (but shown as 0 hrs on the output), making the total exceed 24 hours
[original: nus-cs2113-AY2324S2/pe-interim#1694] [original labels: severity.Low type.FunctionalityBug]