ada: Fix edge case in Ada.Calendar.Formatting.Time_Of
commit869216ec14be5c2be3136de1128b7f1acac3d87e
authorRonan Desplanques <desplanques@adacore.com>
Tue, 23 May 2023 07:07:50 +0000 (23 09:07 +0200)
committerMarc Poulhiès <poulhies@adacore.com>
Tue, 20 Jun 2023 07:30:48 +0000 (20 09:30 +0200)
treee22466b4f263bbc59dd1d89347211a17c371f119
parentd3a21558fda9da3ce094ea6ecd331ced07e9c6fb
ada: Fix edge case in Ada.Calendar.Formatting.Time_Of

Before this patch, Ada.Calendar.Formatting.Time_Of executed extra code
when passed a number of seconds equal to the number of seconds in a day.
This caused the result to be off, perhaps because a statement resetting
the number of seconds to zero was missing.

Instead of adding such a statement, this patch removes the special
handling of the problematic case, which gives the intended result.

gcc/ada/

* libgnat/a-calfor.adb (Time_Of): Fix handling of special case.
gcc/ada/libgnat/a-calfor.adb