Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Convert local time to UTC in .NET framework 3.0

I develop an app. in c#, I should translate local time to UTC, the local time is in time zone that who that use in my app. enters. I must use in .NET framework 3.0, so can't use the TimeZoneInfo object.

Does anyone has an idia how can I do it?

Should use in TimeZone Object?

Thanks

Maybe I can't do it?

like image 463
RRR Avatar asked Nov 18 '25 22:11

RRR


1 Answers

Now I see the problem. Use the following method instead: TimeZone.ToUniversalTime

like image 161
Artem Koshelev Avatar answered Nov 21 '25 12:11

Artem Koshelev