[TYPO3-dev] TCA field input/datetime with current date as default

Caspar Stuebs caspar at gosign.de
Mon Jun 15 18:38:28 CEST 2015


Hi Phillip,

do you tried to use $GLOBALS['EXEC_TIME']? [1]

Kind Regards
Caspar

[1]
http://docs.typo3.org/typo3cms/CoreApiReference/ApiOverview/GlobalValues/GlobalVariables/Index.html

2015-06-15 14:53 GMT+02:00 Philipp Wrann <philippwrann at gmail.com>:

> It seems since TCA is fully cached its not possible anymore to use the
> current datetime as the default value for new records.
>
> Do we have to use a hook to achieve this from now on or is there some new
> setting i miss?
>
> Background: Similar to tx_news i have a field called modification_date,
> which is supposed to store the date the author wants to communicate. So i
> write a story for christmas on 2015-12-20 and it should hold this date as
> the modification_date. When i modify the record the next year and refresh
> the field (to 2016-12-20) this should be visible. So i dont have to write a
> new content but it looks like...
>
> I cant use the tstamp for this because its also refreshed when i fix some
> typo or when i sort the record.
>
> I cant use the crdate because it should really hold the crdate and should
> not be reconfigured.
>
> When i set default => time() the current timestamp is cached in the tca
> and it results in wrong default values if the system cache has not been
> invalidated...
> _______________________________________________
> TYPO3-dev mailing list
> TYPO3-dev at lists.typo3.org
> http://lists.typo3.org/cgi-bin/mailman/listinfo/typo3-dev
>

-- 
-- 

Gosign media. GmbH | We web ideas.
Langenfelder Damm 67 Gewerbehof | 22525 Hamburg
Telefon 040-609 40 79-0

Handelsregister AG HH HRB 112197 | Geschäftsführung Bert Gogolin
Greenpeace energy: Gosign läuft mit ehrlichem Strom und Gas.
GLS Bank: Gosign wirtschaftet mit Gewissen. 



More information about the TYPO3-dev mailing list