[TYPO3-core] RFC: #12652: Value Preview of empty timestamp shows "01-01-70 (-40 yrs) "

David Bruchmann typo3-team-core at bruchmann-web.de
Thu Nov 26 07:23:33 CET 2009


Von:        Martin Kutschker <masi-no at spam-typo3.org>
Gesendet:   Dienstag, 24. November 2009 12:28:44
An:         typo3-team-core at lists.typo3.org
CC:
Betreff:    Re: [TYPO3-core] RFC: #12652: Value Preview of empty 
timestamp shows "01-01-70 (-40 yrs) "


>> +1 for Davids idea. Let's make it "the right way".
> 
> In theory yes, but beware TYPO3 often casts strings to integers (ie treats '' as 0 - and converts it
> usually too [!]). So a NULL value from the DB won't survive long in the internals of TYPO3.
> 
> I stumbled over this when I was trying to fix some issues. In the end I gave up because it wasn't so
> easy to teach TYPO3 the difference between '' and 0.

Hy,

the '0' or '' isn't send to the Browser normally.
When the value is '0' or 0 it's converted as date to 1.1.1970 by PHP.
When it's NULL or '' it can be converted to a space-character or a 
no-brake-entitie ( &nbsp; ) from the point of displaying the date correctly.

Even if there occure any bugs with '0' or with '' in ie or any other 
browser:
It's another bug and has to be reported as ne entry in bugtracker.
When something special bug already is known in a first version it's nice 
to include, but browser-dependent bugs shouldn't retard fixing of a very 
old and grave bug.

I hope that my points get more positiv feedback and the problem will be 
solved soon. When my help is appreciated feel free to ask me but first 
I'd like to get your opinion.

Best Regards
David


More information about the TYPO3-team-core mailing list