I have a system that is used by multiple users and other systems across multiple time zones. I am hosting it on Azure. I want to save all dates in local time, not server time. I am able to do that by keeping track of each customer's local timezone and I am offsetting the dates before saving them in the database.
So far everything works well, however when the dates are sent back to the client's browser MVC thinks they are in UTC (this is the server time for all Azure VMs) and offsets the hours.
What is the most efficient way to prevent this? I tried setting the DateTimeKind to local, but this did not have the desired effect. The dates still got converted. I guess I could pass the dates as strings, but this seems like a hack. There must be a better way to do that.
Your suggestions are highly appreciated.