I have a web application in which different users register to view transactions. I want users to be able to set their own time zone and then bind dates to forms using a custom time zone so that they can search for transactions in the database and adjust the results depending on what time zone the user is in. IE I have a user in the mountain time zone that searches between 8:00 and 20:00 for MDT, and I want them to be able to see transactions created from 8:00 to 20:00 for MDT. I also have another user search in the eastern time zone that wants to search for transactions between 8:00 and 20:00, and I want their search to return results for transactions created between 8 AM EDT and 8 PM EDT. I tried to allow editors from the application,using a custom FactoryBean that pulls out the authenticated user and sets their TimeZone as the time zone used by the DateFormat used by the Spring editors, and this works initially, but by the time the calendars I use make through the Spring binding system, TimeZone is destroyed and is replaced (apparently) by the default system. Has anyone ever implemented such things before? It seems that this is nothing but an epic pain in the butt.TimeZone is destroyed and replaced (apparently) by the default system. Has anyone ever implemented such things before? It seems that this is nothing but an epic pain in the butt.TimeZone is destroyed and replaced (apparently) by the default system. Has anyone ever implemented such things before? It seems that this is nothing but an epic pain in the butt.
source
share