velocity-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Doug Breaux <bre...@users.sourceforge.net>
Subject Re: How do I set a TimeZone for VelocityTools DateTool?
Date Wed, 12 Sep 2012 21:22:10 GMT
On 9/12/2012 2:10 PM, Christopher Schultz wrote:
> Doug,
>
> On 8/14/12 5:20 PM, Doug Breaux wrote:
>> Both the VelocityTools Tools Usage Summary and the DateTool Javadoc seem
>> to indicate a configuration mechanism for setting a TimeZone, but I
>> simply can't discover what that is.
>>
>> DateTool's timezone setter is protected, and I don't want repeatedly
>> pass a TimeZone into the overloaded format() methods.
>
> You might want to: your users might be in different TimeZones and you
> don't want to force an arbitrary TimeZone (yours?) upon them, do you?
>
> -chris

Chris,

Reasonable point. However, in this case, all our users are in one 
TimeZone, a different one from our TimeZone.

However, even if I wanted to allow different TimeZones per user, I'd 
still probably want to set the TimeZone once per "execution" of a 
template and not have to explicitly reference it from each call inside 
that template. (Mind you, unless I needed to display items in multiple 
TimeZones.)

Thanks for making me think about those cases.

BTW, I got my answer at StackOverflow:
http://stackoverflow.com/questions/11907365/how-do-i-set-a-timezone-for-velocitytools-datetool

--
Doug

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@velocity.apache.org
For additional commands, e-mail: user-help@velocity.apache.org


Mime
View raw message