Dealing With Time computers synchronisation and timestamps

  |   By

Time is important for the smooth running of our day to day lives. Everything we do is either governed by or restrained because of time. Yet time is even more essential for computer systems as it is the only point of reference a computer has to distinguish between events and processes.

Everything a computer does is logged by the processor with what process was done and exactly when it was carried out. As computers can process hundreds if not thousands of transactions a second so the time stamp is vital for establishing the order of events.

Computers do not read and use the time in the same format that we do. A computer timestamp takes the form of a single digit that counts the number of seconds from a set point in time. In most systems this is known as the ‘prime epoch’ and is set from 00:00:00 UTC on January 1, 1970. So a timestamp for the date 23 June 2009 the timestamp would read: 1246277483 as this is the number of seconds from the prime epoch.

Computer timestamps are sent across networks and the internet, for instance every time an email is sent it is accompanied by a timestamp. When the email is replied to this too comes with a timestamp. Yet, when neither computer is synchronized the replied email could arrive back with an earlier code and this can cause untold confusion for a computer as according to its logs the email will have arrived back before the original was sent.

For this reason computer networks are synchronized to the global timescale UTC (Coordinated Universal Time). UTC is kept true by a constellation of atomic clocks which means that and computer network synchronised to a UTC source will be highly accurate.

Time synchronization on computers is dealt with by the protocol NTP (Network Time Protocol). Special dedicated NTP servers are available the receive a secure time code from either the GPS network or from specialist radio transmissions broadcast by national physical laboratories and then synchronize entire networks to the single time source.

Synchronizing the Time on your Computer

  |   By

Keeping accurate time is essential for many applications and dedicated NTP time servers make the job easy for network administrators. These devices receive an external time signal, often from GPS or sometimes from broadcast signals put out by organisations such as NIST, NPL and PTB (national physics labs from US, UK and Germany).

Synchronization with a NTP time server is made all the more easier thanks to NTP (network time protocol) this software protocol distributes the time source by constantly checking the time on all devices and adjusting any drift to match the time signal that is received.

Time synchronization is not just the concern of large networks. Even single machines and routers ought to be synchronised because at the very least it will help keep a system secure and make error detection a whole lot easier.

Fortunately, most versions of Windows contain a form of NTP. Often it is a simplified version but it is enough to allow a PC to be synchronized with the global time scale UTC (Coordinated Universal Time). On most Windows machines this is relatively easy to do and can be achieved by double clicking on the clock icon in the task bar then selecting a time provider in the internet time tab.

These time sources are internet based meaning that they are external to the firewall so a UDP port has to be left open to allow the time signal to enter. This can cause some security issues so for those wanting perfect synchronization without any security issues then the best solution is to invest in a dedicated time server. These need not be expensive and as they receive an atomic clock time signal externally then here is no breach in the firewall leaving your network secure.

Dangers of Free Time

  |   By

We are all looking for freebies, particularly in the present financial climate and the internet is not short of them. Free software, free films, free music, almost everything these days has a free version. Even critical applications for our computers and networks such as anti-virus can come free. So it is understandable that when network administrators want to synchronize the time on computer networks they turn to free sources of UTC time (UTC – Coordinated Universal Time) to synchronize their networks using the operating systems’ own inbuilt NTP server.

However, just as there is no such thing as a free lunch, free time sources come with a cost too. To start with all time servers on the internet that are available for the public to use are stratum 2 servers. This means they are devices that receive the time from another device (a stratum 1 time server) that gets it from an atomic clock. While this second hand time source shouldn’t lose too much time compared to the original, for high levels of accuracy there will be a noticeable drift.

Furthermore, internet time sources are based outside the network firewall. For access to the time server a UDP port needs to be left open. This will mean the network firewall will intrinsically have a hole in it which could be manipulated y a malicious user or aggressive malware.

Another consideration is the inbuilt security that the time transfer protocol NTP (Network Time Protocol) uses to assess the time signal it receives is genuine. This is referred to as authentication but is unavailable across the internet. Meaning the time source may not be what it claims to be and with a hole in the firewall it could result in a malicious attack.

Internet time sources can also be unreliable. Many are too far from clients to provide any real accuracy some time sources available on the internet are wildly out (some by hours not just minutes). There are however, more reputable stratum 2 servers available and the NTP pool has details of those.

For real accuracy with none of the security threats the best solution is to use an external time source. The best method for doing this is to utilise a dedicated NTP server. These devices work exterior to the firewall and receive the time either direct from GPS satellites or via broadcasts by national physics labs such as NIST or NPL.

A Guide to Using a GPS Clock

  |   By

The Global Positioning System much loved by drivers, pilots and sea-farers as a method of finding location offers much more than just satellite navigation information. The GPS system work by using atomic clocks that broadcast signals that are then triangulated by the computer in a satellite navigation system.

Because these atomic clocks are highly accurate and don’t drift by as much as a second even in a million years, they can be utilised as a method of synchronizing computer systems. GPS time, the time relayed by the GPS atomic clocks, is not strictly speaking the same as UTC (Coordinated Universal Time), the world’s global timescale, but as they are both based on International Atomic Time it can easily be converted. (GPS time is actual 17 seconds slower than UTC as there have been 17 leap seconds added to the global timescale since the GPS satellites where sent in to orbit).

A GPS clock is a device that receives the GPS signal and then translates it into the time. Most GPS clocks are dedicated time servers too as there is little point in receiving the exact time if you are to do nothing with it. GPS time servers use the protocol NTP (Network Time Protocol) which is one of the internet’s oldest protocols and designed to distribute timing information across a network.

A GPS clock, or GPS time server works by receiving a signal directly from the satellite. This unfortunately means the GPS antenna has to have a clear view of the sky to receive a signal. The time is then distributed from the time server to all devices on the network. The time on each device is regularly checked by NTP and if differs to the time from the GPS clock then it is adjusted.

Setting up a GPS clock for time synchronization is relatively easy. The time server (GPS clock) are often designed to fill a 1U space on a server rack. This is connected to the GPS antenna (usually on the roof) via a length of coax cable. The server is connected to the network and once it has locked on to the GPS system it can be set to begin synchronizing the network.

What Atomic Clocks Have Done for Us

  |   By

Atomic clocks, as many people know they are highly accurate devices but the atomic clock is one of the most important inventions of the last 50 years and has given rise to numerous technologies and applications that have completely revolutionized our lives.

You may think how a clock could be so important regardless of how accurate it is, however, when you consider that precision, that a modern atomic clock doesn’t lose a second in time in tens of millions of years when compared to the next best chronometers – electronic clocks – that can lose a second a day you get to realise just how accurate they are.

In fact, atomic clocks have been crucial in identifying the smaller nuances of our world and the universe. For instance we have for millennia assumed that a day is 24 hours long but in fact, thanks to atomic clock technology we now know that the length of each day slightly differs and in general the earth’s rotation is slowing down.

Atomic clocks have also been used to accurately measure the earth’s gravity and have even proved Einstein’s theories of how gravity can slow time by accurately measuring the difference in the passing of time at each subsequent inch above the earth’s surface. This has been crucial when it comes to placing satellites in orbit as time passes quicker that high above the earth than it does on the ground.

Atomic clocks also form the basis for many of the technologies that we employ in our day to day lives. Satellite navigation devices rely on atomic clocks in GPS satellites. Not only do they have to take into account the differences in time above the orbit but it as sat navs use the time sent from the satellites to triangulate positions, a one-second inaccuracy would see navigational information inaccurate by thousands of miles (as light travels nearly 180,000 miles every second).

Atomic clocks are also the basis for the world’s global timescale – UTC (Coordinated Universal Time), which is utilised by computer networks throughout the world. Time synchronization to an atomic clock and UTC is relatively straight forward with a NTP time server. These use the time signal from the GPS system or special transmissions broadcast from large scale physics labs and then distribute it across the internet using the time protocol NTP.

The Sat Nav How it Works

  |   By

The ‘sat-nav’ has revolutionised the way we travel. From taxi drivers, couriers and the family car to airliners and tanks, satellite navigation devices are now fitted in almost every vehicle as it comes off the production line. While GPS systems certainly have their flaws, they have several uses too. Navigation is just one of the main uses of GPS but it is also employed as a source of time for GPS NTP time servers.

Being able to pin point locations from space has saved countless lives as well as making travelling to unfamiliar destinations trouble free. Satellite navigation relies on a constellation of satellites known as GNSS (Global Navigational Satellite Systems). Currently there is only one fully functioning GNSS in the world which is the Global Positioning System (GPS).

GPS is owned and run by the US military. The satellites broadcast two signals, one for the American military and one for civilian use. Originally, GPS was meant solely for the US armed forces but following an accidental shooting down of an airliner, the then President of the US Ronald Reagan opened the GPS system to the world’s population to prevent future tragedies.

GPS has a constellation of over 30 satellites. At any one time at least four of these satellites are overhead, which is the minimum number required for accurate navigation.

The GPS satellites each have onboard an atomic clock. Atomic clocks use the resonance of an atom (the vibration or frequency at particular energy states) which makes them highly accurate, not losing as much as a second in time over a million years. This incredible precision is what makes satellite navigation possible.

The satellites broadcast a signal from the onboard clock. This signal consists of the time and the position of the satellite. This signal is beamed back to earth where your car’s sat nav retrieves it. By working out how long this signal took to reach the car and triangulating four of these signals the computer in your GPS system will work out exactly where you are on the face of the world.  (Four signals are used because of elevation changes – on a ‘flat’ earth only three would be required).

GPS systems
can only work because of the highly precise accuracy of the atomic clocks. Because the signals are broadcast at the speed of light and accuracy of even a millisecond (a thousandth of a second) could alter the positioning calculations by 100 kilometres as light can travel nearly 100,00km each and every second –currently GPS systems are accurate to about five metres.

The atomic clocks onboard GPS systems are not just used for navigation either. Because atomic clocks are so accurate GPS makes a good source of time. NTP time servers use GPS signals to synchronize computers networks to. A NTP GPS server will receive the time signal from the GPS satellite then convert it to UTC (Coordinated Universal Time) and distribute it to all devices on a network providing highly accurate time synchronization.

The Possibility of Time Travel

  |   By

Exploring the possibilities of time travel including: Time paradoxes, worm holes, 4 dimesnsional space, atomic clocks and NTP servers

Time travel has always been a much loved concept for science fiction writers. From HG Wells’ Time Machine to Back to the Future, travelling forwards or backwards in time has captivated audiences for centuries. However, thanks to the work of modern thinkers like Einstein, it appears that time travel is much a possibility of science fact as it is fiction.

Time travel is not only possible but we do it all the time. Every second that passes is a second further into the future so we are all travelling forward in time. However we think if time travel we imagine a machine that transports individuals hundreds or thousands of years in to the future or past so is that possible.

Well, thanks to Einstein’s theories of general and special relativity, time ravel is certainly possible. We know thanks to the development of atomic clocks that Einstein’s theories about speed and gravity affecting the passage of time is correct. Einstein suggested that gravity would warp space-time (the term he gave to four dimensional space that includes directions plus time) and this has been tested. In fact modern atomic clocks can pick out the minute differences in the passage of time every subsequent inch above the earth’s surface as time speeds up as the effect of the earth’ s gravity weakens.

Einstein predicted speed too would affect time in what he described as time dilation. For any observer travelling close to the speed of light a journey that to an outsider may have taken thousands of years would have passed within seconds. Time dilation means that travelling hundreds of years into the future in a matter of seconds is certainly possible. However, would it be possible to get back again?

This is where many scientists are divided. Strictly speaking theoretical properties of space time do allow for this, although for any travelling back in time a worm hole would have to be created or found. A worm hole is a theoretical link between two parts of space where a traveller could enter one end and appear somewhere completely different at the other end this may be another part of the universe or indeed another point in time.

However, critics of the possibility of time travel point out that because travellers from the future have never visited us that probably means that time travel will never be possible. They also point out the any travelling backwards in time could create paradoxes (what would happen to you if you were mean enough to go back in time and kill your grandparents).

However, time paradoxes exist now. Many computer networks are not synchronised which can lead to errors, loss of data or paradoxes like emails being sent before they were received. To avoid any time crisis it is important for all computer networks to be perfectly synchronised. The best and most accurate method of doing this is to use a NTP time server that receives the time from an atomic clock.

Do I Really Need an NTP Time Server?

  |   By

The NTP time server is a much misunderstood piece of equipment. They are quite simple devices in the sense that they are used for the purposes of time synchronisation, receiving an external source of the time which is then distributed throughout a computer network using NTP (Network Time Protocol).

However, with a myriad of ‘free’ time servers available on the internet many network administrators take the decision that NTP time servers are not necessary pieces of equipment and that their network can do without it. However, there are a huge number of pitfalls in relying on the internet as a time reference; Microsoft and the USA physics laboratory NIST (National Institute of Standards and Time) highly recommend external NTP time servers rather than internet providers.

Here is what Microsoft says:
“We highly recommend that you configure the authoritative Time Server to gather the time from a hardware source. When you configure the authoritative Time Server to sync with an Internet time source, there is no authentication.”

Authentication is a security measure implemented by NTP to ensure that the time signal that is sent comes from where it claims to come from. In other words authentication is the first line of defence in protecting against malicious users. There are other security issues too with using the internet as a time source as any communication with an internet time source is going to require the TCP/IP port to be left open in the firewall this could also be manipulated by malicious users.

NIST too recognise the importance of NTP time server systems for prevention and detection of security threats in their Guide to Computer Security Log Management they suggest:
“Organizations should use time synchronization technologies such as Network Time Protocol (NTP) servers whenever possible to keep log sources’ clocks consistent with each other.”

Choosing a Time Source what to do and what not to do

  |   By

Time synchronization is crucial for many of the applications that we do across the internet these days; internet banking, online reservation and even online auctions all require network time synchronization.

Failing to ensure their servers are adequately synchronized would mean many of these applications would be impossible to achieve; seat reservations could be sold more than once, lower bids could win internet auctions and it would be possible to withdraw you life savings from the bank twice if they didn’t have adequate synchronization (good for you not for the bank).

Even computer networks that on the face of it do not rely on time sensitive transactions also need to be adequately synchronized as it could be near impossible to track down errors or protect the system from malicious attacks if the timestamps on differ on various machines on the network.

Many organisations opt to use internet time servers as a source of UTC (Coordinated Universal Time) – the atomic clock controlled global timescale. Although there are many security issues in doing so such as leaving a hole in the firewall to communicate with the time server and not having any authentication for the time synchronization protocol NTP (Network Time Protocol).

However, in saying that many network administrators still opt to use online time servers as a UTC source regardless of the security implications although there are other issues that administrators should be aware of. On the internet there are two types of time server – stratum 1 and stratum 2. Stratum 1 servers receive a time signal direct from an atomic clock while stratum 2 servers receive a time signal from a stratum 1 server. Most internet stratum 1 servers are closed – unavailable to most administrators and there can be some shortfall in accuracy in using a stratum 2 server.

For the most accurate, secure and precise timing information external NTP time servers are the best option as these are stratum 1 devices that can synchronize hundreds of machines on a network to the exact same UTC time.