Telnet example: telnet time-a.nist.gov 13 The Time and Frequency Division is an operating unit of the Physics Laboratory of the National Institute of Standards and Technology (NIST). Located in Boulder, Colorado at the NIST Boulder Laboratories, the Time and Frequency Division: Maintains the primary frequency standard for the United States. Develops and operates standards of time and frequency. Coordinates U. S. Time and Frequency standards with other world standards. Provides time and frequency services for United States clientele. NIST time setting format The NIST transmits in its own standard Automated Computer Timer Service (ACTS). It is contacted via TCP/IP on port 13. After a setting is made the time string from the NIST used in the setting is displayed in the NIST log window. ClockWatch translates this string. All times from NIST are in UTC. This time string is made up by a series of fields arranged end to end. Message Format received from NIST, with an actual sample string below it: MJD YYMMDD HHMMSS DST LS H ADV MISC 49010 93-01-23 22:01:22 00 0 0 50.0 UTC(NIST) * MJD The first number is the date expressed as a Modified Julian Day number (MJD), in the above example 49010 is the Modified Julian Day. The Modified Julian Day: is obtained by counting days from the starting point at midnight on 17 November 1858. It is one way of telling what day it is with the least possible ambiguity. YYMMDD HHMMSS The next 6 values give the Universal Coordinated date and time (formerly called Greenwich Mean Time) as year, month, day, hour, minute and second. DST The eighth number is the daylight saving time flag, DST. It is based on the continental US system, which has transitions on the first Sunday in April and the last Sunday in October. DST = 0 means standard time is currently in effect. DST = 50 means daylight saving time is currently in effect. DST = 51 means the transition from standard time to daylight time is at 2am local time today. DST = 1 means the transition from daylight time to standard time is at 2am local time today. DST > 51 gives advance notice of the number of days to the transition to daylight time. The DST parameter is decremented at 0000 every day during this advance notice period, and the transition will occur when the parameter reaches 51 as discussed above. 1 < DST < 50 gives advance notice of the number of days to the transition to standard time. The DST parameter is decremented at 0000 every day during this advance notice period, and the transition will occur when the parameter reaches 1 as discussed above. The DST parameter is usually not needed for UNIX systems which keep time internally using Universal Time. Note: ClockWatch uses the Windows internal Time Zone setting to determine if daylight savings time is both used and in effect. LS The next number is the leap second flag, LS. LS = 0 means no leap second is scheduled. LS = 1 means that a leap second is to be added as 23:59:60 on the last day of the current month. The last minute will therefore be 61 seconds long. Leap seconds are usually added at the end of either June or December. LS = 2 means that second 23:59:59 is to be dropped on the last day of the current month. The second following 23:59:58 will be 00:00:00 of the next day. This minute will therefore be 59 seconds long. This situation is unlikely to be necessary in the foreseeable future. Note that leap seconds are inserted or deleted at the specified Universal Times, while daylight savings transitions are always with respect to local time. H The health parameter, H, gives the health of the timeserver: H = 0 means that the server is healthy. H = 1 means that the server is operating properly but that its time may be in error by up to 5 seconds. This state should change to fully healthy within 10 minutes. H = 2 means that the server is operating properly but that its time is known to be wrong by more than 5 seconds. H = 3 means that the hardware or software have failed and that the time error is unknown. ADV The advance parameter, ADV, gives the time advance of the transmissions, in milliseconds. Each time packet is sent out early by this amount to compensate (approximately) for the network delay. MISC The remaining characters on the line identify the time source and are included for compatibility with the ACTS time system. See Also: http://techref.massmind.org/timers.htm --- James Newton mailto:jamesnewton@geocities.com 1-619-652-0593 http://techref.massmind.org NEW! FINALLY A REAL NAME! Members can add private/public comments/pages ($0 TANSTAAFL web hosting) -----Original Message----- From: pic microcontroller discussion list [mailto:PICLIST@MITVMA.MIT.EDU]On Behalf Of andy howard Sent: Wednesday, February 09, 2000 16:50 To: PICLIST@MITVMA.MIT.EDU Subject: [OT]Tempus Fugit... I've seen a number of PC apps that set the PC clock by connecting to an atomic time standard, either directly-dialed or via the net. Does anyone have any info on what time services are available, what protocol is used to access them etc.? This is for a data logger application for use in very remote areas that will be subject to considerable temperature variations. I fear the RTC will be prone to excessive drift unless it is regularly updated. Clock needs to be accurate over periods of several months, maybe years, betweeen maintenance visits. These units will be primarily used in the UK, the rest of Europe and the US, so references for dial-able time standards in those areas would be most helpful - but info on standards anywhere in the world would be welcome. UTC/GMT would be favorite but local time would be fine, assuming I can find the relevant Daylight Saving changeover dates. Because many target sites will have broadcast and other transmitters nearby, the VLF-radio time transmissions (WWV, MSF etc.) as used by radio-code clocks may not be possible in some cases but I'd still be interested to hear of anyone's experiences in using those as a source of standard time. Suggestions for alternative schemes to keep an accurate clock over long periods would also be welcome. Cheers Andy. .