[TYPO3-mvc] Extbase - Imports - Working with \DateTime and native MySQL datetime field

Philipp Wrann philippwrann at gmail.com
Thu Sep 24 17:57:10 CEST 2015


I am currently working on a rest api to import records.

I thought - typo3 supports datetime field in mysql - so make use of it!

But i cant really figure out how to handle it.

A new date is saved correctly but if its reconsituted from persistence it is constructed with some internal timezone setup and the date actually changes. That is very annoying. I want to use a datetime column as matching to determine if a new date has been added or an existing is modifed (or deleted). With that weird behaviour i can not compare the dates correctly.

Has anyone experienced something similar or can anyone give me some hints on that?

I want to import events, they are related to occasions and the source format should be like:
{
occasions : [
{
beginning: '2015-12-12 10:00:00',
ending:'2015-12-12 12:00:00',
ticket:'link',
venue:someid
}
]
}

When loading a allready persisted event from repository typo3 shows this date:
beginning: 2015-12-12 12:00:00
ending: 2015-12-12 14:00:00


More information about the TYPO3-project-typo3v4mvc mailing list