cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From S├ębastien Geindre <sebastien.gein...@meteo.fr>
Subject C2.2 jx:template generator changes time !!
Date Thu, 13 Sep 2007 15:54:06 GMT
A strange things happen ...
In a date form field, i fill 2006-12-14T*12:30*:00.000Z, and i got in 
xml 2006-12-14T*00:30*:00.000Z !!!!

definition :
    <fd:field id="endValidityTime" required="true">
      <fd:label>End Validity Time :</fd:label>
      <fd:datatype base="date">
        <fd:convertor type="formatting">
          <fd:patterns>
            <fd:pattern>yyyy-MM-dd'T'hh:mm:ss.000'Z'</fd:pattern>
          </fd:patterns>
        </fd:convertor>
      </fd:datatype>
    </fd:field>

js :

var form = new Form("definition.xml");
var model = form.getModel();
var data = {   "endValidityTime" : model.endValidityTime};
cocoon.sendPage(pipeline, {"data" : data});

sitemap :
            <map:generate type="jx" src="trace.jx"/>     
            <map:serialize type="xml"/>  

jx file :
<?xml version="1.0" encoding="UTF-8"?>
<XMLdata xmlns:jx="http://apache.org/cocoon/templates/jx/1.0">
    <endValidityTime><jx:formatDate value="${data.endValidityTime}" 
pattern="yyyy-MM-dd'T'HH:mm:ss.SSS'Z'"/></endValidityTime>
</<XMLdata>

when i fill :
form field   --->  xml
2006-12-14T11:30:00.000Z     --->   
<endValidityTime>2006-12-14T11:30:00.000Z</endValidityTime>   OK
2006-12-14T11:60:00.000Z     --->   
<endValidityTime>2006-12-14T12:00:00.000Z</endValidityTime> strange but OK
2006-12-14T*12:00:00*.000Z     --->   
<endValidityTime>2006-12-14T*00:00:00*.000Z</endValidityTime> NOK !!!
2006-12-14T*12:30:00*.000Z     --->   
<endValidityTime>2006-12-14T*00:30:00*.000Z</endValidityTime> NOK !!!
2006-12-14T13:00:00.000Z     --->   
<endValidityTime>2006-12-14T13:00:00.000Z</endValidityTime> OK

It seems that 12 is weird time for jx generator...

Any idea ??


-- 
S├ębastien Geindre
DPREVI/AERO/DEV
sebastien.geindre __at__ meteo.fr



Mime
View raw message