Where is the recommended place to configure the timezone for a user? My
user object has a timezone setting that the user can control
(Member.timezone). The following code seems to work and configure all of
the Wicket components to use the user's timezone:

ClientInfo ci = Session.get().getClientInfo();
((WebClientInfo)ci
).getProperties().setTimeZone(TimeZone.getTimeZone(member.getTimezone()));

However, I'm not sure where the best place to put this code would be.
Should it be on each page? In the Session constructor? Somewhere else?

I was thinking that the Session constructor would be best, but if the
session is created before the user logs in and authenticates, then it won't
get set properly. I can include the code again in my Session.login method.
But is there somewhere else that would be better?

Thanks!
Tauren

Reply via email to