Hello,

In my application the server's timezone could be different to the client's 
timezone. So in my BasicPage I get the client's timezone with this call: 
((WebClientInfo)getSession().getClientInfo()).getProperties().getTimeZone();

So every DateTextField and DateLabel should convert the date between client and 
server right? Now I want to add a DateLabel. The constructor wants a Converter 
so I add this:

DateLabel datelabel = new DateLabel("date",new 
PropertyModel<Date>(model,"eventTimestamp"),new DateConverter(true) {
                @Override
                public String getDatePattern(Locale locale) {
                    return "dd.MM.yyyy HH:mm:ss";
                }

                @Override
                protected DateTimeFormatter getFormat(Locale locale) {
                    return null;  //To change body of implemented methods use 
File | Settings | File Templates.
                }

            });
I don't now how to override the getFormat-method. Can you help me please?

Thanks

Mit freundlichen Grüßen
Christoph Manig


Reply via email to