Easy. I just needed to upgrade from ZF1.10 to ZF1.12.
As you say you can now specify the timestamp format.
$logger = new Zend_Log();
$logger->setTimestampFormat('Y-m-d H:i:s');
Thanks
srayner
On Fri, Sep 14, 2012 at 10:17 AM, Andreas Möller <[email protected]> wrote:
>> Zend_Log has this in the Log() function;
>>
>> // pack into event required by filters and writers
>> $event = array_merge(array('timestamp' => date('c'),
>> 'message' => $message,
>> 'priority' => $priority,
>> 'priorityName' =>
>> $this->_priorities[$priority]),
>> $this->_extras);
>>
>> Which uses ISO format for date. However Firebird database does not
>> seem to accept dates in this format.
>> How should I go about overriding the date format in Zend_Log.
>>
>> Presumably I would have to create my own Log object that extends from
>> Zend_Log and override the whole Log() function.
>> This seems a bit extreme just to reformat a date.
>>
>> I would prefer to keep ISO format in Log object and reformat the date
>> at the database abstraction layer, but it seems
>> ZendX_Db_Adapter_Firebird is not responcible for reformatting dates
>> (which imo kinda defeats purpose of database abstraction).
>> Any thoughts?
>
> If you take a look at
>
> *
> https://github.com/svenax/ZendFramework/blob/release-1.11.11/library/Zend/Log.php#L141
>
> you'll see that the format of the timestamp can actually be configured. I
> assume that this is the same in the latest 1.12.0 release.
>
>
> Best regards,
>
> Andreas
--
List: [email protected]
Info: http://framework.zend.com/archives
Unsubscribe: [email protected]