[TYPO3-mvc] f:format.date timezone "problem"?
Christian Zenker
christian.zenker at 599media.de
Thu Jul 29 12:32:07 CEST 2010
On Thu, 29 Jul 2010 12:01:51 +0200, Sebastian Kurfürst
<sebastian at typo3.org> wrote:
> Hey,
>
>
>> $dateTime = new DateTime('@'.$this->date);
>> $dateTime->setTimezone(new DateTimeZone(date_default_timezone_get()));
>> return $dateTime;
> Couldn't we do this inside Extbase for all DateTime objects we create --
> and then the issue is solved correctly?
After thinking of it - I guess the best way would be to evaluate @var
DateTime on a domain objects property and inject a DateTime object if it
is wanted by the programmer. This way you can also have access to the bare
timestamp if you use @var integer. I guess this would be the most
convenient way to do it. But *I* don't know how to do this in extbase.
Christian.
More information about the TYPO3-project-typo3v4mvc
mailing list