mono
mono copied to clipboard
Settings datetime in Linux causes Windows Forms Timer to stop
Steps to Reproduce
- I have a C# winform application which runs on an Raspberry Pi. It uses Windows Form Timers for various purposes, and I recently spent a few days hunting the cause of a bug which makes the timers freeze. The cause was found to be that datetime was set a few seconds after the C# application was started (the RBPi does not have an RTC so time is set from another PCB via a serial port).
Current Behavior
Expected Behavior
On which platforms did you notice this
[ ] macOS [ ] Linux [ ] Windows
Version Used:
Stacktrace
Please paste the stack trace here if available.
Was fixed in #20596
This is still a problem in mono version 6.12.0.199 on Linux/Ubuntu/Yocto kernel 5.15.137.71. Setting back the system time 1 minute using "timedatectl set-time "2024-06-02 12:06"" on the Linux command line causes the Windows Forms Timer to stop for 1 minute even if the timer is set to fire once per second.