Some sort of Universal Time synchronizer.

Discussion in 'iOS Programming' started by IDMah, Jan 16, 2012.

  1. IDMah macrumors 6502


    May 13, 2011
    Hey All.

    I'm looking for thought on how to get a universal synchronized time.
    Basically I need a reference that will be the same anywhere.

    Is there a way to read the iphones clock but synced with Cupertino time? or something like it without the web access?

    I want to co-ordinate devices with a time stamp.


    ps. any help appreciated, or just pointing in right direction.. thanks !!!
  2. phantax macrumors member

    Feb 2, 2009
    Just use NSDate, I would format it out as GMT to keep a consistent time stamp.
  3. ianray macrumors 6502

    Jun 22, 2010
    Do you mean UTC -- ignoring timezone?

    Or do you mean synchronized, such that you compensate for devices whose clocks were set manually or have drifted. If so, you need to consider how to send a calibration signal to the devices. Without net access this may not be straightforward ;)
  4. mfram macrumors 65816

    Jan 23, 2010
    San Diego, CA USA
    iPhones already get their time from the cellular network. And I think iPods/iPad already use SNTP to get their time. The problem is solved, you don't have to solve it.
  5. IDMah thread starter macrumors 6502


    May 13, 2011
    Yes a universal synchronized time.

    ignore what the user's time is set to, ignore the time zone.

    Basically a time stamp that will be the same no matter where you.
    It's looking like I need to have web access for this.. sigh ...

    but I'll look into SNTP..

  6. chown33 macrumors 604

    Aug 9, 2009
    on the Western Slopes, with E. A. Poe
    Exactly what problem are you trying to solve?

    "Coordinate devices with a time stamp" is far too vague. It also fails to state how accurate the time stamp needs to be, nor explain why that accuracy is necessary.

    You haven't said whether the devices are networked or not, either. I'm guessing, "not networked", otherwise you wouldn't be sighing about needing a network connection. So you have an unspecified number of non-networked devices that must still "coordinate" using timestamps, for some unspecified reason and with unspecified accuracy.

    Unless you're doing navigation or observation of astronomical phenomena, I don't think a few seconds (or even a few minutes) inaccuracy is going to matter. But since you haven't explained what you're trying to do, that's just a guess.

    Have you considered that GPS contains an accurate clock, and perhaps that information is available?

    XY Problems
    .. you want to do X, and you think Y is the best way of doing it.
    .. Instead of asking about X, you ask about Y.

    .. How do I use X to accomplish Y?
  7. IDMah thread starter macrumors 6502


    May 13, 2011
    not that accurate

    Basically I need to know within seconds when an event takes place.
    I'm not flying space ships. Just need some sore of reference to correlate one event with another, within a few seconds.

    I'll look into gps timing.. and all the other suggestions.
    but maybe I'll shelve the feature for 'future expansion.'

  8. MattInOz macrumors 68030


    Jan 19, 2006
    Exactly and the way SNTP works the user would have be off network for a long time before the drift was enough to be worried about a "couple of seconds" of accuracy.

Share This Page