Page 1 of 1

time stamp

Posted: Wed Feb 17, 2016 10:33 pm
by mister
I wrote a program that uses a time stamp button. Isn't time linked to the internal clock of the device, so being outside a service provider's area shouldn't effect the time stamp, right?

Larry

Re: time stamp

Posted: Thu Feb 18, 2016 12:37 am
by dunbarx
Hi.

The internal clock runs just fine without an internet connection. It is based on a baseline in the year 1969, at least on a Mac.

Code: Select all

on mouseUp
   get 0
   convert it to date
   answer it

--You can go negative if you want to.

 get -100000000
   convert it to date
   answer it
end mouseUp
I assume that the accuracy of this clock is adjusted regularly through an internet time server, but if you pull the Cat5 cable out of your machine, the process will run just fine. Not sure how accurate it will be after a few hours or weeks...

Craig Newman

Re: time stamp

Posted: Sat Feb 20, 2016 10:54 pm
by mister
Hi Craig,

Thanks for responding.

After researching ntp servers, cell towers radio frequencies, hand offs between towers etc., the problem(s) i might encounter are:

drift -
Internal clocks of iPhones and iPads are typically less accurate than quartz watches,because there is no room to build in a high-quality crystal oscillator". If you let them run freely they will show considerable drift.
latency - the differential between the cell tower signal to the phone and i'm assuming that each time you go from a dead zone to service area could cause problems as well.

We may just be talking about a difference in seconds, which won't render the app useless, but i know that the app i'm trying to replace is having considerable difficulties with time keeping. I don't know what code they use or how it's structured, so hopefully there is opportunity here.

Considering ways to make it work would be using GPS(assuming those signals are not blocked either) or turning off cellular and wifi when running the app, forcing the app to use the internal clock until the end of the day.

The only way to figure this out is to build a standalone and test it. Unfortunately, the only device i have to test with is IOS 9.21, which is not yet compatible with Livecode, correct? What TIME (pun intended) might i be able to do this?

A few links if your interested:
[url][http://watch.camp/2014/11/apple-watch-t ... curacy/url]
[url]http://opensignal.com/blog/cell-towersw ... ectly//url]
[url]http://www.macobserver.com/tmo/article/ ... e_sure/url]

Thanks,
Larry