Callback queue shows overdue tasks incorrectly
The task scheduled for today is due tomorrow or disappears after a change of date, and the list of backlogs is inconsistent.
Why is this happening?
Mixing UTC time and local time, lack of unambiguous ending status or sorting of dates saved as text cause wrong queues.
Step by step solution
1. Save the term as a time value with a clear time zone and display it in the employee zone.
2 . Distinguish scheduled, overdue, executed and cancelled tasks.
3 . Compare the date filter on the server with local formatting in the browser, especially when changing time.
4 . Set a stable sorting after the deadline and ID, not after the string displayed to the user.
5 . Test the dates before midnight, after midnight and during summer time changes.
How do I check the score?
The test term appears at the right time on different devices and does not disappear after refresh.
Do not arbitrarily add one or two hours to the date to mask the time zone error.