I am currently managing an asp.net + c# application that tracks the working hours of employees using System.DateTime.now for logging purposes. With users connecting to the application from different countries, a client has requested that their employees working abroad log their hours according to their respective time zones.
Since all dates and times in the database are not in universal time, converting everything to UTC seems impractical. Therefore, I am exploring the idea of allowing the admin to define time zones through an interface, giving users the option to select their preferred time zone.
While I am aware of methods like JavaScript and geolocation to detect user time zones, I have concerns about their accuracy. Hence, I believe letting the admin set up time zones would be a more reliable approach. What is considered the best practice for handling this situation? Thank you.