Details
-
Type:
Improvement
-
Status:
Resolved
-
Priority:
Major
-
Resolution: Won't Fix
-
Affects Version/s: 0.8.0
-
Fix Version/s: 1.5.0
-
Component/s: Zend_TimeSync
-
Labels:None
Description
Problem:
Zend_TimeSync is potentially dangerous. Although it works nicely, and does what it claims, there is a big risk of developers accidentally running time queries (SNTP/NTP) on public time servers for every web page request.
Proposed Solution:
In order to minimize this risk, Zend_TimeSync should default to a safe behavior. After the i18n team discussed this issue at length, Andries proposed adding magic sleep/wakeup methods to Zend_TimeSync, so that the component can maintain persistent state. The state is needed for Zend_TimeSync to have sufficient intelligence to make an informed decision about whether to use a cached time offset, or poll some time servers (and which ones) to update the offset, without "abusing" public time servers.
Initially, the implementations for _sleep/_wakeup could use Zend_Cache, but developers ought to have the ability to overload these and use other mechanisms to persist the state of Zend_TimeSync.
Attachments
Issue Links
| This issue is dependecy of: | ||||
| ZF-961 | Proposed Feature: Enable Zend_Date::now() / Zend_TimeSync to interoperate |
|
|
|
Please consider attached file