473,395 Members | 1,440 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

NTP - Time Synch?

Folks, I need to find and synch some php scripts to a NTP service
somewhere. I'll appreciate any info on just where/how?

-AS

Aug 2 '07 #1
8 3423
On Aug 2, 4:12 pm, ashore <shor...@gmail.comwrote:
Folks, I need to find and synch some php scripts to a NTP service
somewhere. I'll appreciate any info on just where/how?

-AS
I am pretty sure that you would want to sync the time on your server,
which I do not know if there is a way to sync the time using PHP, but
likely permission to change the ntp syncing on a server through php
likely would be disabled...I may be wrong, but I think you would
probably need to just sync the time using your ntpd daemon or service.

Aug 2 '07 #2
Thanks, but not that complicated. If I can get a valid/accurate
network time, I can then maintain the delta between that and the
server's time, and then use that delta in time-sensitive stuff.

BTW, I just have found a php script for getting ntp time, and now the
job is getting it to work.

AS-

Aug 3 '07 #3
ashore <3a*****@comcast.netwrote:
>
Thanks, but not that complicated. If I can get a valid/accurate
network time, I can then maintain the delta between that and the
server's time, and then use that delta in time-sensitive stuff.
It's interesting to me that you believe it would be less complicated to add
an NTP client and time adjustment software to your script, than it would be
to just run ntpd on your server and have the server time be correct at all
times.
--
Tim Roberts, ti**@probo.com
Providenza & Boekelheide, Inc.
Aug 3 '07 #4
Tim Roberts wrote:
It's interesting to me that you believe it would be less complicated to add
an NTP client and time adjustment software to your script, than it would be
to just run ntpd on your server and have the server time be correct at all
times.
He may not have root on his server.

--
Toby A Inkster BSc (Hons) ARCS
[Geek of HTML/SQL/Perl/PHP/Python/Apache/Linux]
[OS: Linux 2.6.12-12mdksmp, up 43 days, 14:00.]

Command Line Interfaces, Again
http://tobyinkster.co.uk/blog/2007/0...nd-line-again/
Aug 3 '07 #5
On Aug 2, 4:12 pm, ashore <shor...@gmail.comwrote:
Folks, I need to find and synch some php scripts to a NTP service
somewhere. I'll appreciate any info on just where/how?

-AS
the ntp daemon is really not complicated at all to setup, if you have
root access to access the server, you can find a lot of simple guides
to get your server setup to sync its time. If you do not have root
access and can not get those that do have it to setup an accurate
time, the previous poster is right, I would look for a new server.
Perhaps I misunderstood a little regarding your subject and message,
but a time sync would mean to me, and probably 99% of others out there
that you want to set the time on your host server to some external
source, not just display some accurate or use said accurate time in
your scripts.

However, if you are wanting to display an accurate time in yoru
scripts for some other time zone or something, ntp is not the best
choice for accomplishing that to just show in your scripts. NTP
should be used to get an accurate time on your server itself, where
the daemon runs constantly and updates its time based on one or more
sources 24x7. You could then use a couple of functions to get a
different time if desired with date, mktime, and time, if for example
you wanted to use a time from a different timezone then your current
hosting server.

Aug 3 '07 #6
Gary L. Burnore wrote:
If he can't get those who DO have root to run correct time, he should
use a different server.
True.

--
Toby A Inkster BSc (Hons) ARCS
[Geek of HTML/SQL/Perl/PHP/Python/Apache/Linux]
[OS: Linux 2.6.12-12mdksmp, up 43 days, 20:53.]

Command Line Interfaces, Again
http://tobyinkster.co.uk/blog/2007/0...nd-line-again/
Aug 3 '07 #7
Summing up:

1. This is for use in an Open Source application I'm developing. I
don't want to emburden each potential user with more complexity than
needed. The application needs the time information - not the server.
I expect the app will maintain a delta factor - correct_time minus
server_time.
2. I don't have root access, nor do I expect other installations/
users to have it.
3. I want accurate time cuz there's a need to get a time stamp on
some application events that will correlate with some off-system
events. The latter will have accurate time stamps.
4. No, it need not be NTP. If anyone is aware of a non-NTP solution
that fits the above parameters, please share that info.
5. Meanwhile, I have located a small PHP script that reads like it
will do it, but I'm having trouble getting it to work. It's at
http://www.aota.net/forums/showthread.php?t=21147

Thanks, folks.

-AS

Aug 4 '07 #8
On 2007-08-04, ashore <3a*****@comcast.netwrote:
1. This is for use in an Open Source application I'm developing. I
don't want to emburden each potential user with more complexity than
needed. The application needs the time information - not the server.
I expect the app will maintain a delta factor - correct_time minus
server_time.
2. I don't have root access, nor do I expect other installations/
users to have it.
3. I want accurate time cuz there's a need to get a time stamp on
some application events that will correlate with some off-system
events. The latter will have accurate time stamps.
4. No, it need not be NTP. If anyone is aware of a non-NTP solution
that fits the above parameters, please share that info.
5. Meanwhile, I have located a small PHP script that reads like it
will do it, but I'm having trouble getting it to work. It's at
http://www.aota.net/forums/showthread.php?t=21147
It looks as if the script is targetting a dead time server,
for one thing. Try 0.pool.ntp.org.
Aug 7 '07 #9

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
by: steve | last post by:
Hi, I finally figured out the best way to synch local and remote script folders, containing many php script files. What I used to do before was try to ftp all the changed files, etc. which was...
13
by: Peter Hansen | last post by:
I would like to determine the "actual" elapsed time of an operation which could take place during a time change, in a platform-independent manner (at least across Linux/Windows machines). Using...
0
by: moko | last post by:
This is a bit long-winded. Can somebody read thru these 2 use cases, and tell me if it is feasible ? :- Use Case : Replication before Offline Synch Scenario 1 : Oracle Server , MSDE client ...
5
by: NB | last post by:
Hi In my 2 years with Access I have never seen this, now it makes me mad In an unbound form frmTH I have a frmList which is a continous form In its on current event, I synch 4 of its fields...
5
by: Rob | last post by:
I have a form where the user may see a matrix of data in a grid (populated via a dataset). If the user wishes to add a new row of data, they click a button and a new form opens where the user may...
7
by: Paul Probert | last post by:
Hi, My app runs in a loop looking for changes in a database, and like a good boy I call time.sleep(1) inside the loop. Unfortunately this sometimes runs for 200 seconds or so, presumably while my...
2
by: sfeher | last post by:
Hi All, I am having trouble big times figuring out a way of forcing a DIV to be in synch with another DIV's height in a (mostly vertically) fluid layout in a web app context. The first one has...
2
by: piggy | last post by:
Hello, I have an application and when a user clicks on it, it first will check to see if the there is a new version in the server using files synch (ftp). If there is then download the new...
9
by: Neil | last post by:
I'm using an Access MDB as a front end to a SQL 7 database. When I place the system time in a field in Access, it used the user's clock. I'd like to use the SQL Server system time, so that the...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.