What is the best way to convert the local time to UTC? Accounting for Daylight Savings, etc whenever it is in effect.
And vice versa...
Printable View
What is the best way to convert the local time to UTC? Accounting for Daylight Savings, etc whenever it is in effect.
And vice versa...
Calling the API routine GetSystemTime will place the current UTC in the specified SYSTEMTIME structure.
Note that this applies only to the US, Even in the international versions, Microsoft admits to not being very good at determining local daylight savings cutover dates.