I have a global application compsed by many sub-applications :
- Web sites
- Windows services
I want to dispatch those "application part" in many servers. My problem is : I want the dates to be still accurate. If an event is stored at 6:00 PM pacific time, I don't want my european users to see "6:00 PM" on their board.
I've read a lot of articles that say "you just have to save your dates that way" => but I can't change the way each single date is saved, that represent too much work (and yes, it's datetime that are saved and not dateoffset).
I've read other articles that propose to change the time zone on the server => But I can't want to do that, as those server can be used for others purposes.
The good news is that dates are always defined in the application and not generated by the database.
In consequence, the only thing I have to do is to define the TimeZone at application level. So wherever they are, my applications will always work with the same timezone. The only step left will be to convert the dates at UI level, in the timezone of the current user (very simple as all dates are passing throught the same localized datetime conversion method).
I really cannot afford to changes the ways the application developpers work, as it will be prone-to-error. They need to keep using DateTime.Now, without ever thinking of conversion.
The exact technologies I use are not relevant here, the question is global .Net.
Thanks for your help
Edit : let's say my problem is just to have DateTime.Now return the UTC date. Is there a way to do that ?