Re: Time code!

This WebDNA talk-list message is from

2002


It keeps the original formatting.
numero = 43561
interpreted = N
texte = Bob Minor wrote: > Anybody written a code snippet to grab the time from a time server? > > Sorry for the dual post! > This is not trivial, or IMHO necessary. The OS should be responsible for getting the time correct, not an application.That being said, if the remote time server is running a web server, you can use something like this to get a date string from it: [TCPConnect host=isd.smithmicro.com&port=80] [TCPSend]HEAD / HTTP/1.0[UnURL]%0D%0A%0D%0A[/UnURL][/TCPSend] [/TCPConnect]and you will get the following HTTP headers back: HTTP/1.1 200 OK Server: Microsoft-IIS/5.0 Date: Thu, 19 Sep 2002 10:59:00 GMT Connection: Keep-Alive Content-Length: 1270 Content-Type: text/html Set-Cookie: ASPSESSIONIDQGQQGJDC=DFEDPNDDJGBEIKFNDAEPBAEL; path=/ Cache-control: privateIt is left as an exercise for the reader to figure out how to get the Date: header out and interpret it as a time in the local timezone.But seriously, run xntpd or better yet clockspeed on your local server. It is the O/S that should be setting the time, not a usermode application.John-- John Peacock Director of Information Research and Technology Rowman & Littlefield Publishing Group 4720 Boston Way Lanham, MD 20706 301-459-3366 x.5010 fax 301-429-5747 ------------------------------------------------------------- This message is sent to you because you are subscribed to the mailing list . To unsubscribe, E-mail to: To switch to the DIGEST mode, E-mail to Web Archive of this list is at: http://search.smithmicro.com/ Associated Messages, from the most recent to the oldest:

    
  1. Re: Time code! (Bob Minor 2002)
  2. Re: Time code! (John Peacock 2002)
  3. Re: Time code! (dale's stuff 2002)
  4. Re: Time code! (Gary Krockover 2002)
  5. Re: Time code! (Bob Minor 2002)
  6. Re: Time code! (John Peacock 2002)
  7. Re: Time code! (dale@gmr.dresdner.net 2002)
  8. Re: Time code! (Bob Minor 2002)
  9. Re: Time code! (John Peacock 2002)
  10. Re: Time code! (dale@gmr.dresdner.net 2002)
  11. Re: Time code! (Bob Minor 2002)
  12. Re: Time code! (John Peacock 2002)
  13. Re: Time code! (Bob Minor 2002)
  14. Re: Time code! (Alain Russell 2002)
  15. Re: Time code! (John Peacock 2002)
  16. Time code! (Bob Minor 2002)
Bob Minor wrote: > Anybody written a code snippet to grab the time from a time server? > > Sorry for the dual post! > This is not trivial, or IMHO necessary. The OS should be responsible for getting the time correct, not an application.That being said, if the remote time server is running a web server, you can use something like this to get a date string from it: [TCPConnect host=isd.smithmicro.com&port=80] [tcpsend]HEAD / HTTP/1.0[unurl]%0D%0A%0D%0A[/UnURL][/TCPSend] [/TCPConnect]and you will get the following HTTP headers back: HTTP/1.1 200 OK Server: Microsoft-IIS/5.0 Date: Thu, 19 Sep 2002 10:59:00 GMT Connection: Keep-Alive Content-Length: 1270 Content-Type: text/html Set-Cookie: ASPSESSIONIDQGQQGJDC=DFEDPNDDJGBEIKFNDAEPBAEL; path=/ Cache-control: privateIt is left as an exercise for the reader to figure out how to get the Date: header out and interpret it as a time in the local timezone.But seriously, run xntpd or better yet clockspeed on your local server. It is the O/S that should be setting the time, not a usermode application.John-- John Peacock Director of Information Research and Technology Rowman & Littlefield Publishing Group 4720 Boston Way Lanham, MD 20706 301-459-3366 x.5010 fax 301-429-5747 ------------------------------------------------------------- This message is sent to you because you are subscribed to the mailing list . To unsubscribe, E-mail to: To switch to the DIGEST mode, E-mail to Web Archive of this list is at: http://search.smithmicro.com/ John Peacock

DOWNLOAD WEBDNA NOW!

Top Articles:

Talk List

The WebDNA community talk-list is the best place to get some help: several hundred extremely proficient programmers with an excellent knowledge of WebDNA and an excellent spirit will deliver all the tips and tricks you can imagine...

Related Readings:

[WebDNA] mod_WebDNA_apache2.2.so: mach-0, but wrong architecture (2010) [CART] inside a [LOOP] (1997) CSS positioning!!! (2001) PIXO support (1997) Appendfile memory usage (redux) (2003) [format] (1998) method of payment (1997) webcat NT with [dos] command (1997) [addlineitems] display (1997) [WebDNA] [announce] WebDNA Site and Store (2008) upgrading (1997) [Lookup] on secure page not returning anything (2000) WriteFile Formatting (2000) Help! Odd, irreproducible happenings. (1998) Error reading data -1 (1997) syntax question, not in online refernce (1997) WebTV problems with WebCatalog?? (1998) CAlendar (2003) WebCat2 several catalogs? (1997) test mail (2004)