Re: How to get TIME from NTP



Gerhard Gentele napsal(a):
Hello Jan,
it works fine - many thanks.
One last qestion:
Is there a ready made function to get daylight saving time for Germany
instead the UTC, without doing calculations based on the calendar and time.


Sorry, I have never seen (and I have never needed) something like this. I can recommend you to go to:
http://fox.wikis.com/wc.dll?Wiki~VisualFoxProWiki
and to write "time" into search box and to inspect the results of query. I am sure you can find there many interesting issues.

Best regards



Greetings Gerhard



"Jan Bucek" <bucek.jan@xxxxxxx> schrieb im Newsbeitrag
news:O8uomcogIHA.4684@xxxxxxxxxxxxxxxxxxxxxxx
oie=createobject("InternetExplorer.Application")
oie.Navigate("http://tycho.usno.navy.mil/cgi-bin/timer.pl";)
do while oie.ReadyState <> 4
doevents
enddo
cTime = oie.Document.Body.InnerText
oie.Quit()

? [returned:], cTime
cTime = substr(cTime, at(',', cTime) + 2)
cTime = substr(cTime, 1, at(chr(13), cTime) - 1)
cTime = alltrim(strtran(cTime, 'UTC', ''))
? cTime + ' - this is UTC time'


Gerhard Gentele napsal(a):
Hello everybody,
I would like to get the UTC-TIME (universal time coordinated) via NTP
using
an MS OCX.
At the start of an application I just want to make sure that the time is
set
correct.
Therefore the NTP should get asked in unicast mode. There a "request" must
be send to get the time string as a reply (don't know how the request
looks
like).
I think MSINET.OCX should get used to get the asked information.
Somewhere i read that I have to use the SNTP CLIENT OPERATION and not the
NTP. The reason is that I use Windows 2000.

This is a real little "tricky know how" thing that everybody working with
VFP could use.
Is somebody out there who has done the job already. Any help available?

Greetings: Gerhard F. Gentele



.


Loading