views:

23

answers:

0

Hello,

I have a web application which has different users logging in to view transactions. I want to be able to let the users set their own time zone and then have dates on forms be bound using the user's timezone so that they can search transactions in a database and have the results adjusted depending on what time zone the user is in. IE I have a user in the mountain time zone searching between 8 am and 8 pm MDT, and I want them to be able to see transactions created between 8 am and 8 pm MDT. I also have another user searching in the eastern time zone who wants to search for transactions between 8 am and 8 pm, and I want their search to return results for transactions created between 8 am EDT and 8 pm EDT. I've tried having the editors resolved from the application using a custom FactoryBean that pulls the currently authenticated user and sets their TimeZone as the timezone used by the DateFormat used by Spring's editors, and this works initially, but by the time the calendars I'm using make it through Spring's binding system, the TimeZone is wiped out and replaced with (apparently) the system default. Has anybody ever implemented this sort of thing before ? It seems like nothing short of an epic pain in the butt.