Creating the instance affects the timezone.
Using set methods affect the timezone.
The manual states multiple ways (more than 20?) to affect the timezone.
In the code you gave the locale affects the timezone.
And we still don't know how your complete date looks like.
So all we can do is prediction.
And using your code on both locales I get:
sr_RS: string '2009-10-22T10:01:36+02:00' (length=25)
en_GB:string '2009-10-22T10:01:36+02:00' (length=25)
Greetings
Thomas Weidner, I18N Team Leader, Zend Framework
http://www.thomasweidner.com
----- Original Message -----
From: "Саша Стаменковић" <[email protected]>
To: "Thomas Weidner" <[email protected]>
Cc: <[email protected]>
Sent: Wednesday, November 11, 2009 8:47 AM
Subject: Re: [fw-general] Zend_Date problem
How do I set timezone to affect Zend_Date component?
I use zend date to create view helper for date formatting.
Regards,
Saša Stamenković
On Wed, Nov 11, 2009 at 8:21 AM, Thomas Weidner
<[email protected]>wrote:
Sorry, but date_default_timezone_set has no effect on the timezone which
is
actually used by the instance of Zend_Date nor has it effect on DST.
My question was related to the instance not your environment.
Why don't you output all dateparts from the instance instead of giving
partitial informations ?
Greetings
Thomas Weidner, I18N Team Leader, Zend Framework
http://www.thomasweidner.com
----- Original Message ----- From: "Саша Стаменковић" <[email protected]>
To: "kobsu" <[email protected]>
Cc: <[email protected]>
Sent: Wednesday, November 11, 2009 7:59 AM
Subject: Re: [fw-general] Zend_Date problem
@Thomas Weidner
*
*
date_default_timezone_set('Europe/Stockholm'); is in bootstrap.
@kobsu
*
*
*Same result :(
*
Regards,
Saša Stamenković
On Tue, Nov 10, 2009 at 6:20 PM, kobsu <[email protected]> wrote:
Try
Zend_Date::setOptions(array('fix_dst' => true));
before
$date = new Zend_Date();
umpirsky wrote:
>
> Hi zf community.
>
> This code:
>
> $date = new Zend_Date(null, null, $locale);
> $date->setTimestamp(1256198496);
> echo $date->getDate()->toString(Zend_Date::DATES);
>
> gives date 21.10.2009. for sr_RS locale (similar for other locales),
> for
> en_GB it gives 21 Oct 2009.
> I expect 22 Oct 2009. it's whole day missed?!?!?
>
> Any idea?
>
--
View this message in context:
http://old.nabble.com/Zend_Date-problem-tp26283342p26287337.html
Sent from the Zend Framework mailing list archive at Nabble.com.