-1

I'm using xamarin to develop an iOS app, and need to be able to determine the actual time(FYI..12:00 AM) based on the timezone in C#. I'm using the NSTimeZone object to determine the time zone, but can't seem to figure out how to determine the actual time in the time zone. Remember, I need to be able to do this in c#. Everything that I find online is in objective c.

Thanks in Advance!

1 Answers1

0

I actually figured the answer to my own question. See code below...

DateTimeOffset LocalTimeOffset = TimeZoneInfo.ConvertTime(DateTimeOffset.UtcNow, TimeZoneInfo.FindSystemTimeZoneById(NSTimeZone.SystemTimeZone.ToString()));