[TYPO3-project-formidable] rdt_date: different behaviour when submitted

Pablo Santamaría webdeportivo at yahoo.es
Fri Oct 30 19:21:45 CET 2009


Hi Jerôme:

I've upgraded to revision 2.0.421. I've performed some tests, with the 
following XML:
[...]
<!-- case A -->
<renderlet:DATE name="case_A" label="...">
    <data>
       <dateTime format="%d/%m/%Y %H:%M"/>
    </data>
</renderlet:DATE>

<!-- case B -->		
<renderlet:DATE name="case_B" label="...">
    <data>
       <dateTime format="%d/%m/%Y"/>
    </data>
</renderlet:DATE>
[...]

For case A - as you can see, showing hour and minutes in renderlet-:
    * when selecting 02/01/1970 in calendar and submitting-> 86400 in DB 
  (OK).
    * After submitting, renderlet in browser shows: 02/01/1970 01:00. 
This output matches the result of strftime() for such epoch in my computer.
    * Further submits doesn't change renderlet value in browser and in 
DB neither.

For case B - omitting hours and minutes-:
    * when selecting 02/01/1970 in calendar and submitting-> 86400 (OK).
    * After submitting, renderlet in browser shows: 02/01/1970 (OK)
    * However, further submits give the following result:
       - in browser: the same value
       - in BD: 82800, which in my timezone (Europe/Madrid) corresponds 
to 02/01/1970 00:00.

Any ideas?

Thanks in advance,
Pablo.

JéŽrô™me Schneider wrote:
> Hi Pablo,
> 
> I tried to reproduce using Formidable 2.0.367 and could not succeed.
> If true, it's indeed a bug of rdt_date in corelation with timezones.
> 
> Could you try with dates at 2nd January 1970 ?
> For this date, correct GMT timestamp should be 86400.
> 
> I tried:
>     * inserting it in DB => OK 86400
>     * resubmit and updating in DB => OK 86400
> 
> PS: you may try updating to revision 2.0.418 by SVN following 
> instructions you'll find here: http://formidable.typo3.ug/svn
> 
> 
> Regards,
> Jerome
> 
> Pablo Santamaria Lois a écrit :
>> Hi to all!
>>
>> I would like to share with you a problem which arose to me while 
>> working with renderlet:DATE.
>>
>> Using a formidable template in edition mode, I've seen the following 
>> behaviour:
>> A) if I change renderlet's value using the widget, and then submit the 
>> form, value stored in DB seems to be the chosen one. (OK)
>> B) however, if I submit the form without change renderlet's value, 
>> date in DB WILL be changed, to a different timestamp. (current value - 
>> 7200)
>>
>> Let's see an example:
>> A) I've selected 14/10/2009 in renderlet's widget, so in DB will be 
>> stored:
>> 1255478400. This timestamp means [1]:
>> - GMT: Wed, 14 Oct 2009 00:00:00 GMT
>> - My timezone: Wed 14 Oct 2009 02:00:00 AM CEST
>>
>> B) With previous timestamp in DB, I didn't change renderlet's value, 
>> but submitted the form. In DB will be stored the following: 
>> 1255471200, which means:
>> - GMT: Tue, 13 Oct 2009 22:00:00 GMT
>> - My timezone: Wed 14 Oct 2009 12:00:00 AM CEST
>>
>> As far as I know, TYPO3 stores timestamps in BD in GMT format, so in 
>> case B), is renderlet:DATE managing correctly timezones?
>>
>> In case B), Why date in BD is modified although it wasn't changed 
>> using the renderlet?
>>
>> Any help from you will he highly appreciated.
>> Thanks in advance, Pablo.
>>
>> ----
>> I'm using TYPO3 4.2.8 and Formidable 2.0.367
>> $GLOBALS['TYPO3_CONF_VARS']['SYS']['serverTimeZone'] = 1
>>
>> [1] http://www.epochconverter.com/
>>
>>
>>       
> _______________________________________________
> TYPO3-project-formidable mailing list
> TYPO3-project-formidable at lists.typo3.org
> http://lists.typo3.org/cgi-bin/mailman/listinfo/typo3-project-formidable


More information about the TYPO3-project-formidable mailing list