ZF-932: Proposed Feature: Enable Zend_Date / Zend_TimeSync to interoperate
When I say "new Zend_Date()" with no parameters, I would like to have some way of instructing the ZF to give me a new Zend_Date object using time() + the offset from Zend_TimeSync. Thus, if someone gives me some code using Zend_Date, I have a way to make the existing code use the correct, "true" time for now.
Currently: $server = new Zend_TimeSync('ntp://serveraddress', 'alias'); $date = $server->getDate(); // pretend NTP server returned a time of 00:01 $date->isToday(); // fails if the actual server's time is 23:56 and the true time is 00:01
Proposed Change: $date->isToday() does not fail for the use case and situation above. For example, the protected _getTime() could be integrated in some way with Zend_TimeSync.
There are more situations like this, where Zend_Date relies on time(), which could be wrong.