jamesmontemagno / Xamarin.Plugins

Cross-platform Native API Access from Shared Code!
MIT License
1.3k stars 380 forks source link

Position.Timestamp wrong on iOS #271

Closed helmerm closed 8 years ago

helmerm commented 8 years ago

This is a

Which plugin does this impact:

Version Number of Plugin: 3.0.4 Device Tested On: iPhone 6 iOS 9.3 Simulator Tested On:

Expected Behavior

Position.Timestamp should return correct UTC timestamp

Actual Behavior

Position.Timestamp returns wrong UTC time

Steps to reproduce the Behavior

Bug Location in Code

The ToDateTime() extension method produces a DateTime with an Kind.Unspecified. Calling the ToUniversalTime() method will assume Kind Local and convert the timestamp to UTC. MSDN Link

Use the static SpecifyKind method instead MSDN Link

kgerken commented 8 years ago

@lothrop already created a pull request for this issue, see #266.

helmerm commented 8 years ago

Did not see that... Thanks.