David,

Thanks for the reply!

Actually, I solved the problem by taking a different approach - I created a toTimeZone method that takes a String time zone ID and I put it in UtilDateTime. So, I can achieve the same result with

TimeZone userTz = UtilDateTime.toTimeZone(userLogin.getString("lastTimeZone"));



David E Jones wrote:



Adrian Crum wrote:

I'm going to include a small helper method that takes a UserLogin GenericValue and returns a TimeZone object. I don't know where to put it. UtilDateTime.java seems like a good choice, but it is a part of the base component, so I'm not sure if it should depend on the entity component. I looked around in the common component but I didn't see an appropriate home there.


Checkout the UtilHttp.getCurrencyUom method. It gets the GenericValue from the session, but just treats it as a Map to avoid a compile time dependency on the entity component.

These little utility methods should probably just go into the UtilHttp ones, along with the currency and locale methods.


-David

Reply via email to