Closed heikkilevanto closed 3 years ago
Probably related to the new feature of enabling date/time entry
Confirmed, but I am too tired to hunt it down now.
Enabled the commented-out debug prints on the dates, and filed a wine after midnight: BEFOR D='' T='' S='2020-12-27 00:19:20' E='Sat; 2020-12-26' AFTER D='2020-12-27' T='00:19:20' S='2020-12-28 00:19:20; Sun' E='2020-12-27'
On the second line, D is right, but S has a wrong date and weekday, and E date is wrong.
The code was clearly wrong. No need to check if we are past midnight, just take the date of now - 8hrs, and you have the effdate. The wkday comes the same way. Committed a change to that effect, it works now, past midnight. Test tomorrow and close if ok.
Fixed again, using 'date' to get the effdate right, even when entering date/time.
I filed a beer - actually a wine - on the night of 24-Dec, bit past midnight. It got filed with timestamp "2020-12-26 00:17:15;" and effdate "2020-12-25", both off by one day.