[TYPO3-english] DateTime issue extbase persistence

Toke Herkild th at t3cms.dk
Fri Apr 8 10:35:14 CEST 2016


Hi All,

Found a workaround for this issue:

{myDateTime -> f:format.date(format:'Y-m-d\TH:i:sP')}

Where the P at the end adds the TimeZone offset, this seems to help
extBase to calculate the correct UTC for the DB.

Regards,
Toke

On 07-04-2016 11:12, Toke Herkild wrote:
> Hi all,
> 
> I've a little problem with DateTimes and it is works as this:
> 
> TYPO3 version 6.2.17
> Server timezone: CEST
> PHP Timezone: EUROPE/COPENHAGEN
> TYPO3 Timezone settings:
> [SYS][serverTimeZone] = 1
> [SYS][phpTimeZone] = Europe/Copenhagen
> 
> When Using a DateTime in a model following hapens:
> 
> In list view, DateTime is correct (20160406T09:00:00).
> Detail view DateTime is displayed (20160406-06T09:00:00).
> In Confirm DateTime is (20160406T09:00:00)
> In createAction DateTime is (20160406T09:00:00)
> After redirect from createAction DateTime is (20160406T11:00:00).
> Doing a FROM_UNIXTIME in mysql also gives (20160406T11:00:00).
> 
> Only place where this could be changed is in the repository->add($model);
> 
> Anyone got an idea as to why this happens ?
> 
> Regards,
> Toke Herkild
> 
> ---
> Denne e-mail blev kontrolleret for virusser af Avast antivirussoftware.
> https://www.avast.com/antivirus
> 


---
Denne e-mail blev kontrolleret for virusser af Avast antivirussoftware.
https://www.avast.com/antivirus



More information about the TYPO3-english mailing list