Slashdot Mirror


Do You Have The Time?

RetroGeek writes: "This ZDNet article talks about the perils of the PC clock. And (something I did not know) that Windows XP and Mac OS X both automatically get a time stamp from MicroSoft and Apple respectively. At any rate, my home firewall gets the time every hour from the NIST servers, then each of the machines on my LAN query the time server daemon on the firewall. That way all my home network machines have the same time. And latency on the LAN is next to zero. Now if I can only get my VCR connected. Anyone else running a time server?" So how do you get the time?

43 of 432 comments (clear)

  1. How do I get the time? by Ethelred+Unraed · · Score: 5, Funny

    I look at a clock. Or maybe my (wind-up) wristwatch.

    Sheesh. Geeks. If it ain't digital, it ain't.

    Cheers,

    Ethelred

    --
    Everyone wants to be Ethelred. Even I want to be Ethelred.
  2. Microsecond accuracy for $25 by shoppa · · Score: 5, Interesting
    1. Roofmounted Trimble SVeeSix-CM3 GPS receiver with microsecond-accurate pulse-per-second output: $24.95.
    2. Network Time Protocol synchronization software: Free
    1. Re:Microsecond accuracy for $25 by ceejayoz · · Score: 5, Funny

      3. Having the correct time, always: Priceless.

    2. Re:Microsecond accuracy for $25 by shoppa · · Score: 5, Informative
      Did you just have to build a serial cable for that, or did you have to build some other interface electronics to make it talk to your computer?

      The GPS output signals are CMOS/TTL level, not RS-232, so I put them through an MAX 232converter before they come out of the box on the roof and run downstairs to the PC. This is not exotic stuff; TTL to RS-232 converters are pretty much 30 year old technology.

      The protocol is just plain async serial, so no special electronics to encode/decode.

  3. IP spoofing target by RichMan · · Score: 4, Insightful

    Ok, this is bad. A somewhat critical state of the OS is dependant on a blindly connected service. Please tell me the time server is authenticated fully and unbreakably. Hah.
    Just wait for
    1) MS to implement expirable licenses on all software
    2) someone to break the authentication service
    3) IP spoofing of the time server to a clock set 100 years in the future when everyones time based license has expired

    The result is instant crippling of all MS licenses!

    1. Re:IP spoofing target by FearUncertaintyDoubt · · Score: 5, Funny
      You forgot:

      4) ???
      5) Profit

  4. the benefits of accurate timekeeping by lakeland · · Score: 4, Informative

    Personally I arbitarialy declare the firewall as having the same time and use cron to update everyone from that. Since latency between machines is almost equal, everybody is out by the same amount.

    Before anybody thinks it is silly to keep clocks tightly synchronised, try running NFS without it and you'll run into no end of problems. Even as little as one second will cause errors with make. The key is that all clocks must read the same, not that they need to be correct.

    Oh, and don't get fooled into thinking you can accurately synchronise against those atomic clocks. The algorithms they use to average results make a number of incorrect assumptions that will result in you being out by a small constant amount, about as much as if you'd synchronised off an ordinary clock.

  5. Time for my VCR by the+eric+conspiracy · · Score: 5, Interesting

    Some VCRs including my JVC can get a time signal that is broadcasted by PBS stations via cable. It's wonderful to never have to set that puppy.Combined with ntp for my computers, and WWV for my stand alone clocks (so called 'atomic alarm clocks' I am down to one clock that I have to set - my wristwatch.

    1. Re:Time for my VCR by Mr.+Sketch · · Score: 5, Interesting

      I am down to one clock that I have to set - my wristwatch.

      Not if you had one of these.

    2. Re:Time for my VCR by MrCreosote · · Score: 5, Funny

      'My watch is accurate to 1 second in 1 million years'

      'So what time is it now?'

      'Uhh, about quarter past.'

      --
      MrCreosote Meow!Thump!Meow!Thump!Meow!Thump! "You're right! There isn't enough room to swing a cat in here!"
  6. In Windows? NetTime... by krez · · Score: 4, Informative

    There's a nice open-source utility at Sourceforge (http://sourceforge.net/projects/nettime/) that I use at work on my Windows machine.

    I like it because it's simple, unobtrusive, and invisible once it's installed.

    --
    =U= "Just because you're not paranoid doesn't mean they aren't out to get you"
    1. Re:In Windows? NetTime... by rehannan · · Score: 4, Informative

      In the interest of multiple opinions, I like Automachron. It's a lot smaller than NetTime (130KB vs. 2MB) and is also unobtrusive. You can make it invisible or stick it in your system tray.

      Here's a screenshot of it running on my system.

  7. Simple by Mr.+Sketch · · Score: 3, Informative

    time.org.

    I can even get the date too :)

  8. http://www.ntp.org by MavEtJu · · Score: 4, Informative

    Go to http://www.ntp.org to get all your time-synchronisation questions answered.

    Also for in- or near-Germany living people: http://www.dcf77.de. Wish I knew it was a german-specific service before I came to .au and found out that my DCF77 receiver didn't work here...

    --
    bash$ :(){ :|:&};:
  9. Re:ntpdate [server] in crontab... by Dr.+Ion · · Score: 5, Informative

    Consider running a proper NTP daemon instead.

    It has the advantage of not jerking your clock around every time you sync. It makes calculated "smooth" adjustments to keep your clock accurate. It can also use multiple servers.

    It's the difference between a perfectly-ticking clock, and one that gets manually reset twice a day to make it (temporarily) accurate.

    The biggest impact this will have is if you do file access across the network or need your timestamps to be reliable. Depending on how much your clock drifts, that ntpdate adjustment could back up several seconds. This can wreck havok on timestamp-dependent things, like "make".

    Most ntpd distributions make this easier to set up than a crontab entry anyway. :)

  10. Maintaining a medium-size net of clocks by angio · · Score: 5, Interesting
    As part of the Resilient Overlay Networks project at MIT, I maintain a testbed of about 20 nodes, most of which have GPS-based time synchronization. We've started using a really fun little box from EndRun Technologies called the Praecis Ct. It gets GPS time that's being rebroadcast by cellular CDMA base stations. They provide accuracy to about 10 microseconds, and don't require a roof antenna -- anywhere you can get CDMA cellular service, you can use these things. They're kind of pricey (about $1k), but they're completely easy to use and set up. For more general information about NTP and things, see ntp.org, which mtaintains a nice FAQ about things-ntp.

    For a few of the european hosts, we use GPS time receivers, primarily the Motorolla Oncore UT+ kits. You can get eval units of these, google around. They're nearly as easy to use, but do require a kernel config change.

    It's really kind of addictive playing with time. :-) And you get spoiled by never having any clock weirdness on any of your machines...

  11. I found... by IanBevan · · Score: 5, Interesting

    ..that the Microsoft time server was 3 minutes slow ! This was about 2 weeks ago. I checked it against both another time server, and then the UK speaking clock (dial 123 in the UK) which is synchronised with Greenwich. As a result, I disabled the time synch (right click on the time in the system tray, Adjust Date Time, Internet tab, uncheck the box). I now use the time synchronisation feature that comes with the Dynip client.
    Since the MS time synch is enabled by default, they really should make sure their server farm has the correct time :(

  12. Coursey is a whinner... by burnsy · · Score: 4, Informative

    UNFORTUNATELY, the clients in Windows and Mac OS aren't ideal. They share two problems: First, they may not synchronize often enough.

    That Coursey sure is a whinner and clearly he does little research. I took me 15 seconnds to find this at Google.

    To control the number of seconds to wait between attempts to synchronize the system clock to an time source on the Internet using the following Windows XP...

    Hive: HKEY_LOCAL_MACHINE
    Key: SYSTEM\CurrentControlSet\Services\W32Time\TimeProv iders\NtpClient
    Name: SpecialPollInterval
    Type: REG_DWORD
    Value: #secondsdesired default

  13. Most cablemodem/DSL head-end routers have the time by Dr.+Ion · · Score: 5, Informative

    If you're on cable or DSL, most of the upstream routers run proper NTP servers, and they're just a hop away. The bandwidth for running an NTP client is minimal.

    To find the nearest NTP server, to a traceroute to a few non-local hosts. Then start at your nearest router and ping each one for a time server using something like 'ntptrace'.

    Near-perfect accuracy, just a trickle of data, and your provider will thank you for using nearby machinery.

  14. I use NTP like this..... by Dr.+Awktagon · · Score: 5, Informative

    On your Red Hat Linux server/firewall/whatever (easily adapted to any NTP setup, really):

    ntp.conf:
    server time.apple.com
    server tick.usno.navy.mil
    server tock.usno.navy.mil
    # In case the network is down
    server 127.127.1.0
    fudge 127.127.1.0 stratum 10

    broadcastdelay 0.008
    authenticate no

    driftfile /etc/ntp/drift
    pidfile /var/run/ntpd.pid
    logfile /var/log/ntpd

    and /etc/ntp/step-tickers has the IP addresses for those hosts, all one line (the Red Hat startup script uses these to set the clock at boot, in case it's WAY out of sync.):

    17.254.0.27 192.5.41.40 192.5.41.41 17.254.0.26 17.254.0.31

    Then on your LAN, have all your other machines use this machine as the time server. That's it! Never set a clock again.

    It's important to have accurate time for many protocols, including HTTP, and also to timestamp your logs accurately for forensics and evidence.

    For even more accurate and secure local timeservers, run a GPS antenna to your roof and buy one of these products.

    1. Re:I use NTP like this..... by thogard · · Score: 3, Informative

      Don't use the master clocks unless you need that kind of accuracy (then ask them and they will give the the names of better servers).

      Do a traceroute out out of your net and see if you can find a few other servers.
      $ ntpdate -v -u 64.39.2.65
      will tell you if its running ntp or not. Pick a few of your upstream and go with that. If you have several upstream routes/providers then ntp will make sure you get the correct time if one of them gets way out of sync.

  15. Comment removed by account_deleted · · Score: 3, Informative

    Comment removed based on user account deletion

  16. Re:Aint that just the way... by rodgerd · · Score: 3, Informative

    Even many of these are way too heavily loaded. Many ISPs run ntpd on some of their servers; point at them, instead.

  17. Re:a potential problem by stripes · · Score: 3, Informative
    Is that MS's or Apple's fault for changing your time on you w/o your permission?

    Well in Apple's case at least it might be your fault for not going to "Date and Time" panel and either unchecking "Use a network time server", or pointing at a NTP server that keeps your kinda time (yes OSX uses real NTP, and yes, they let you choose any NTP server you like).

    Or much better...for not changing the timezone files so you live 7 hours and 50 minutes ahead of GMT not 8 hours...

  18. Re:Aint that just the way... by TeddyR · · Score: 3, Informative

    They dont even need to use srtatum 2 servers if they are on cable, or have a responsible isp.

    Many isp's have an ntp server that they use for their own equipment. Ask them what they use.

    Most Cisco routers with IOS 11.3 or higher (methinks...) can act as ntp servers for an end node.

    Most cable providers "head end" equipment are also NTP servers. (Part of the DOCSIS standard requires that the cablemodems sync their clocks when they get their config files).

    Most Linux/RH users can traceroute to somewhere... and then use ntptrace on each hop that traceroute shows to see if the device is an ntpserver.

    Use the closest one that has the correct time.. [because unfortunately, some ISPs dont know how to properly/fully configure their equipment.]

    --

    --
    Time is on my side
  19. apt-get install chrony by John+Hasler · · Score: 4, Informative

    The default configuration works with a dialup.

    --
    Warning: this article may contain humor, sarcasm, parody, and perhaps even irony. Read at your own risk.
  20. Coincidence by Large+Green+Mallard · · Score: 3, Interesting

    Just yesterday at work I was talking with a researcher about this.. he was showing me an NTP server he made, using two DGPS units and some embedded ethernet controllers.. he said the accuracy on it was about 40 nanoseconds from UTC..

    That should probably be suitable I think :)

    http://truetime.net sells some rack GPS-based NTP Servers too.. but I don' know the price.

  21. Re:a potential problem by bnenning · · Score: 3, Informative

    In Mac OS X, you have to turn automatic NTP synchronization off before you can manually adjust the time. At least when using the Date & Time preference pane; you can also run "date" from a command line but in that case you should know what you're doing.

    --
    How to solve most of our problems: 1.Lots of nuclear plants. 2.Cure aging.
  22. Don't Do That by John+Hasler · · Score: 5, Informative

    "...my home firewall gets the time every hour from the NIST servers,..."

    Don't use stratum one servers for your home network. It's wasteful and unnecessary. Use a stratum 2 or higher server or your ISP's server.

    --
    Warning: this article may contain humor, sarcasm, parody, and perhaps even irony. Read at your own risk.
  23. Re:Is this an XP thing? by netsharc · · Score: 3, Informative

    net help time (in W2K Command Prompt). The only GUI option is the option to start the service on bootup, it's under Administrative Tools, Services. You can even set the NNTP server it should connect to, I use my uni's server.

    --
    What time is it/will be over there? Check with my iPhone app!
  24. Time Server_s_, plural... by The+Monster · · Score: 5, Informative
    The summary says that you have to get your sync from MS. Fortunately, this is untrue. I see two choices when I'm running XP:
    • time.windows.com
    • time.nist.gov
    Take a wild guess which one I chose...

    But if you want more choices than that:
    This article inspired me to do some dumpster-diving in the Registry... Import this key/value:

    [HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Services\ W32Time\TimeProviders\NtpServer]
    "InputProvider"=dword:00000001
    This allowed me to set my own choice of NTP server, and then synced from it. Like many other MS 'features', the
    default can be changed, if you know how...
    --

    [100% ISO 646 Compliant]
    SVM, ERGO MONSTRO.

  25. Comment removed by account_deleted · · Score: 5, Insightful

    Comment removed based on user account deletion

  26. And you can hack the interval, too. by The+Monster · · Score: 5, Informative
    A few more moments perusing the Registry reveals that you can also set the interval between syncs:
    [HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Services\ W32Time\TimeProviders\NtpClient]
    "SpecialPollInterval"=dword:00003840
    The value '3840' there is hex for 14400, the number of seconds in 4 hours. Note that setting
    the key won't affect the next, but the one after that will read this value to determine the time
    for the one after that.
    --

    [100% ISO 646 Compliant]
    SVM, ERGO MONSTRO.

  27. Or, if you need something even better than NTP... by jelson · · Score: 5, Interesting
    Wow, who would have thought that the topic of my PhD thesis would be on the front page?

    Right now I'm doing research in very high precision time synchronization for very large numbers of very small things. My lab does work in sensor networks -- get a tiny little computer with a few sensors and a radio, sprinkle thousands of them out over a building or a battlefield or a forest. Have the network tell you where the fire started, where the enemy is lurking, which light bulb needs to be replaced, or a thousand other things.

    You need very time sync to do lots of this stuff -- to track motion, for example. Our current testbed times the flight of sound to tell how far apart things are, and for that we need accuracy on the order of 10 microseconds between clocks.

    My research right now centers around a new time sync scheme, called Reference Broadcast Synchronization, which in a recent study I showed is almost an order of magnitude more precise than NTP under the same conditions -- 5 microseconds between a group of nodes with a userspace implementation, and down to 1 microsecond in the in-kernel implementation (which is the resolution of the clock! I'll do better when I have a clock that ticks more than once a microsecond.)

    NTP, even under "optimal" conditions -- very high query rate to a stratum 1 GPS-steered clock in our lab--- did no better than 50 microseconds. When we introduced high levels of congestion on the network, NTP degraded by a factor of 30 while RBS was almost unchanged.

    Of course, NTP is still a fantastic protocol, and much better than trying to apply RBS to the Internet (which is basically impossible). But for tiny nodes that need very tight time sync, I say, we can do better :-).

    Some recent papers you might like are here, including
    • "Fine Grained Network Time Sync using Reference Broadcasts" -- the original RBS paper
    • "Wireless Sensor Networks: A New Regime for time synchronization" -- my argument as to why NTP shouldn't be used for sensor networks
    • "Locating nodes in time and space: A case study" -- description of our testbed that is capable of localizing objects down to 1cm by measuring time of flight of sound, combined with RBS time sync.
    It's funny, I'm sitting in the lab right now, tinkering with the testbed when this article should come up.

  28. Re:[SC0RE: -1, Microserf] by foobar104 · · Score: 5, Interesting

    There's latency, and then there's relativity. When the server receives the time request, it takes the current timestamp and puts it in a network packet, which then trickles down the wire to the client. The client receives the packet and then knows what time it was at the server. That's latency. If you're NTP'ing over a dial-up connection from a distant server, the latency can be a second or more in worst cases. (NTP may have features to compensate for this; I couldn't say.)

    Relativity affects the rate at which time runs for two observers in different inertial frames. It doesn't affect synchronization directly; if you ignore or compensate for latency, you can synchronize two clocks in different reference frames. But the clocks will start to drift apart immediately due to the different rates at which time passes in the two frames.

    Now here's the cool thing. According to general relativity-- actually, according to my vague recollection of general relativity from a college semester more than ten years ago-- gravity affects the rate at which time passes in a reference frame. In other words, time runs more quickly in a high gravity field relative to a lower gravity field.

    It's pretty well known that the local force of gravity varies measurably over the Earth's surface. Depending on where you are, the local force of gravity may be higher or lower.

    So if you wanna get accurate, pick an NTP server in a region with a similar local G to yours.

    HHOS. ;-)

  29. Re:why go 3rd party ? by TimeGuy · · Score: 4, Informative

    Why go 3rd-party? Because, NET TIME (and Windows Time) is fraught with problems, particularly in a larger network/mixed environment. More detailed info about this at our site http://www.greyware.com/software/domaintime/produc t/w32time.asp Yes, I work for them, but I'd use this even if I didn't.

  30. Re:Atomic Wall Clock by Phork · · Score: 3, Interesting

    It gets the signal from wwvb in colorado, which broadcasts the time on 60khz encoded in bcd using some odd modulation scheme. wwvb time is very accurate, at the trasmitter i think the accuracy is within a picosecond. If you know your location you can calculate the time it takes the signal to reach you from the transmitter, and get your time as accurate as the clock at the transmitter. WWVB is run by NIST. They also run two other radio stations, wwv and wwvh. WWV broadcasts from the same site in colorado that WWVB broadcasts from, but broadcasts a voice signal of the time, a pulse every second, as well as bcd and several other things. WWV broadacts on 2.5, 5, 10, 15, and 20 MHz. WWVH broadcasrs the same thing as WWV but is located in hawai, has a female voice instead of the male voice that WWV has, and doesnt broadcast on 20mhz. WWV rocks.

    --
    -- free as in swatantryam - not soujanyam.
  31. Re:In Windows? The Fourth Dimension by wideangle · · Score: 4, Informative
    I like Dimension4. Besides the Dr. Who reference, it's 112KB -- smaller than your Automachron.

    Here's the screenshot.

    Plus, it's coded by some guy at Microsoft. :

  32. Related: update daily by coyote-san · · Score: 3, Interesting

    Another point is that it's unnecessary to update more often than daily except for the most exacting situations. Do you really need to keep your clocks synchronized to within milliseconds? I've found daily updates against a time server (which is sync'd to my ISP's NTP source) via a cron job running 'rdate' is good enough to keep my systems synced to within a second.

    The other nice thing about this aproach is that it's easy to toss the Windows equivalence of 'rdate' into the startup scripts managed by Samba, so whenever a Windows box comes onto the network it's also synced.

    --
    For every complex problem there is an answer that is clear, simple, and wrong. -- H L Mencken
  33. On OSX... by banky · · Score: 3, Informative

    Just load netinfo manager and look for /config/ntp. From there you can use whatever server you want.

    --
    ZOMG I WOULD LOVE TO KNOW ABOUT YOUR FEELINGS ON MACINTOSH VERSUS WINDOWS, VI VERSUS EMACS, AND HOW YOU'RE NOT A DORK
  34. Re:Is this an XP thing? by Sheridan · · Score: 4, Interesting
    NB. Microsoft hasn't exactly been RFC compliant in their NTP server/client interactions.

    If you do a Google groups search for "NTP XP Mills" you'll find a host of articles detailing exactly what David L. Mills (Author of ntpd and the RFC1305) thinks of Microsoft's (intentionally?) b0rken implementation of NTP in WinXP this is one example

  35. Leap seconds, dude by shoppa · · Score: 5, Informative
    I once hooked up an NTP server to a GPS receiver (makers name omitted because I don't recall who made it) and found a 13 second error. Obviously the makers test suite hadn't included a check that the time it gave was right.

    It was right. The GPS time epoch is 0000 UT on 6-Jan-1980. Since then UTC has had 13 leap seconds inserted. This offset is available in the NAV message; maybe the version of NTP you used was ignoring that message or maybe that particular GPS receiver didn't implement that message. (Actually, buggy firmware in GPS receivers has been a problem in the past.)

  36. Re:ntpdate [server] in crontab... by renehollan · · Score: 3, Informative
    I think I just found the reason why people want bluetooth in everything!

    I came to this same conclusion.

    Though, appliance-rich areas, like kitchens, and laundry rooms could do with a pre-wired network: either ethernet or HomePNA. HomePNA is probably easier for low bandwidth applications, like time sync, status checks, etc., and, if I'm not mistaken, can be piggybacked on POTS. Most people have POTS lines already pulled to the kitchen, the location of most dumb clocks. Heck, use a powerline based network, just get time to where it's displayed!

    --
    You could've hired me.