Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

iOS System Timestamp - C# Monotouch/Xamarin

I need to synchronize some data that is captured simulataneously on multiple iphones.

Question

  1. Does iOS have a system timestamp field (or similar)?
  2. If so, does every iphone in the same timezone/area/region etc. have EXACTLY the same time? i.e. Is it based on a particular clock or from an Apple server?
  3. If not, is there anyway that I can ensure that two pieces of data, that are both captured on separate iPhones, can be stamped with the same timestamp at the point of beginning the data capture?

Thanks.

like image 523
Goober Avatar asked Jan 31 '26 01:01

Goober


1 Answers

DateTime.UtcNow will get you the current UTC time.

Most devices will sync their time based on the wireless carrier. Otherwise there is a system option to automatically sync time that is presumably using an NTP server.

Depending on what kind of granularity you need, this may be good enough.

like image 76
Jason Avatar answered Feb 01 '26 14:02

Jason



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!