Chapter 3. Zend_TimeSync

Table of Contents

3.1. Introduction
3.1.1. What is NTP?
3.1.2. What is SNTP?
3.2. Querying timeservers
3.2.1. Basic NTP query
3.2.2. Basic SNTP query
3.2.3. Using the fallback mechanism
3.2.4. Taking care of exceptions

3.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.

3.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.

3.1.2. What is SNTP?

Todo