struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Joe Germuska <...@Germuska.com>
Subject Re: Formatting a date with a different time zone.
Date Tue, 01 Feb 2005 23:08:31 GMT
At 5:55 PM -0500 2/1/05, Derrick Koes wrote:
>Can someone point me to the struts tag to use to format a date with 
>a different time zone than the system default (i.e. 
>Calendar.getInstance(TimeZone) vs. Calendar.getInstance())?

I would probably recommend using the JSTL formatDate tag instead of 
any Struts tag:

http://java.sun.com/products/jsp/jstl/1.1/docs/tlddocs/fmt/formatDate.html

You could probably also use bean:write with the "format" (or 
"formatKey") attribute:
http://struts.apache.org/userGuide/struts-bean.html#write  You would 
specify the "format" as if you were using java.text.MessageFormat 
with your bean as the single replacement argument to the format 
string.

Joe

-- 
Joe Germuska            
Joe@Germuska.com  
http://blog.germuska.com    
"Narrow minds are weapons made for mass destruction"  -The Ex

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


Mime
View raw message