I am working with a VB.NET 2005 application in which I need to store date and time information. I'm using a datagridview which is backed by a datatable (unbound to a database). At the end of every session, I write this datatable to an XML file, and in new sessions I attempt to reload the datatable from the stored XML (ReadXML/WriteXML methods).
My goal is to make the application independent of timezones. If I'm in GMT-5 and store datetime info, I want to be able to write this to the XML file, then change my computer to GMT-8, reload the datatable, and see that datetime exactly as originally input. 5:00pm is 5:00pm whether in Eastern Time or Pacific Time.
Of course, the answer typically suggested is to use Universal Time. That's okay, but I need help in making the application stay in the Universal Time mentality. I need the datagridview to not do any conversions to local time and to properly write to the XML with the +00:00 extension.
(By the way, if you can answer this question, you can probably answer this person's question which is about to be deleted, I think: https://www.experts-exchange.com/Programming/Languages/.NET/Class_Libraries/ADO.NET/Q_23307356.html
Many many thanks.