In my winforms application, I have to display a list of events (like buttons' clicks) with the time of each of them. The time format has to be the same as Windows regional settings. So I'm using DateTimeoffset.ToLocalTime().ToString()
for that which is working perfectly.
If I change Windows regional settings (time zone or format) while the application is running, the time is still displayed on the old format. As a workaround, I have to restart the application so it will grab the new regional settings.
Is there a way to get these settings on the fly?