Chapter 2. Zend_TimeSync

Table of Contents

2.1. Introduction
2.1.1. What is NTP?
2.1.2. What is SNTP?
2.2. Querying timeservers
2.2.1. Basic NTP query
2.2.2. Basic SNTP query
2.2.3. Using the fallback mechanism
2.2.4. Taking care of exceptions

2.1. Introduction

Zend_TimeSync is able to receive internet or network time from a timeserver using the NTP or SNTP protocol. With Zend_TimeSync a page/script is able to act indepentendly from the timesettings of the server the script is running.

[Note] Server's time

Zend_TimeSync is not able to change the server's time, but it will return a date object from which the difference to the servers time can be worked with.

2.1.1. What is NTP?

The Network Time Protocol (NTP) is a protocol for synchronizing the clocks of computer systems over packet-switched, variable-latency data networks. NTP uses UDP port 123 as its transport layer.

2.1.2. What is SNTP?

Todo