cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Marcin Okraszewski <okrasz_n...@o2.pl>
Subject [Woody] Date field - how to change format to 24 hours.
Date Mon, 19 Jan 2004 23:12:30 GMT
Hi,
I want to set date and time in a field but in 24 hours format. I set 
fallowing entry in model:

     <wd:field id="dueTo">
       <wd:datatype base="date">
         <wd:convertor type="formatting">
           <wd:patterns>
             <wd:pattern>dd.MM.yyyy HH:mm</wd:pattern>
             <wd:pattern locale="pl">dd.MM.yyyy HH:mm</wd:pattern>
           </wd:patterns>
         </wd:convertor>
       </wd:datatype>
     </wd:field>

and in template I also specify format to:

     <wt:widget id="dueTo">
        <wi:styling type='date' format="dd.MM.yyyy HH:mm"/>
     </wt:widget>

But when I enter a sample date "24.01.2004 12:05", it is recognized as 
00:05 (12:05am) (it is saved in DB in this way). But when I enter 
"24.01.2004 13:05", then it is all right (1:05pm).

What am I doing wrong?

Regards,
Marcin Okraszewski


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


Mime
View raw message