ZF-987: Extensible sleep / wakeup
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.
h3. 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.