Some sort of Universal Time synchronizer.

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

  1. IDMah macrumors 6502

    IDMah

    Joined:
    May 13, 2011
    #1
    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.

    thanks
    Ian

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

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

    Joined:
    Jun 22, 2010
    Location:
    @
    #3
    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

    Joined:
    Jan 23, 2010
    Location:
    San Diego, CA USA
    #4
    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

    IDMah

    Joined:
    May 13, 2011
    #5
    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..

    thanks
     
  6. chown33 macrumors 604

    Joined:
    Aug 9, 2009
    #6
    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
    http://www.perlmonks.org/index.pl?node_id=542341
    .. 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?
    http://perl.plover.com/Questions3.html
     
  7. IDMah thread starter macrumors 6502

    IDMah

    Joined:
    May 13, 2011
    #7
    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.'

    thanks
    Ian
     
  8. MattInOz macrumors 68030

    MattInOz

    Joined:
    Jan 19, 2006
    Location:
    Sydney
    #8
    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