Yes. But in my case, I need to start with a customer ID, like GMT-5 and a dst rule. Even I got the list, I still don't know which one has dst and which one has not.
Howard > -----Original Message----- > From: Kris Schneider [mailto:[EMAIL PROTECTED] > Sent: Thursday, June 12, 2003 2:31 PM > To: Tag Libraries Users List > Subject: RE: timeZone and day light saving time > > > It seems like you should be able to do what you want without > that much trouble. > If the time zone is given as a string, it's parsed using > java.util.TimeZone.getTimeZone(). For example: > > <fmt:timeZone value="America/Bogota"> > ... > </fmt:timeZone> > > <fmt:timeZone value="America/Detroit"> > ... > </fmt:timeZone> > > Both have the same raw offset but have different daylight > savings behavior. I > suppose the trick is knowing which of the supported time zone > IDs to use > (TimeZone.getAvailableIDs can get you a list). Here's a list > of the IDs for "GMT-5": > > America/Bogota > America/Cayman > America/Detroit > America/Eirunepe > America/Fort_Wayne > America/Grand_Turk > America/Guayaquil > America/Havana > America/Indiana/Indianapolis > America/Indiana/Knox > America/Indiana/Marengo > America/Indiana/Vevay > America/Indianapolis > America/Iqaluit > America/Jamaica > America/Kentucky/Louisville > America/Kentucky/Monticello > America/Knox_IN > America/Lima > America/Louisville > America/Montreal > America/Nassau > America/New_York > America/Nipigon > America/Panama > America/Pangnirtung > America/Port-au-Prince > America/Porto_Acre > America/Rio_Branco > America/Thunder_Bay > Brazil/Acre > Canada/Eastern > Cuba > EST > EST5EDT > Etc/GMT+5 > IET > Jamaica > SystemV/EST5 > SystemV/EST5EDT > US/East-Indiana > US/Eastern > US/Indiana-Starke > US/Michigan > > Quoting Howard Lin <[EMAIL PROTECTED]>: > > > Do something like this in the jsp page: > > > > <%-- timzone w/o dst --%> > > <fmt:setTimeZone value="GMT-5" var="tz"/> > > <% > > TimeZone tz = (TimeZone)pageContext.getAttribute("tz"); > > SimpleTimeZone stz = new > SimpleTimeZone(tz.getRawOffset(), tz.getID(), 3, 1, > > 1, 7200000, 9, -1, 1, 7200000, 3600000); > > pageContext.setAttribute("stz", stz); > > %> > > <%-- using timezone with dst rule --> > > <fmt:formatDate value="${date_time}" type="both" > pattern="yyyy-MM-dd HH:mm" > > var="formated_date_time" timeZone="${stz}" /> > > > > Check Javadoc of SimpleTimeZone for DST rules in the constructor. > > > > Howard > > > > > -----Original Message----- > > > From: Mike Deegan [mailto:[EMAIL PROTECTED] > > > Sent: Thursday, June 12, 2003 1:25 PM > > > To: Howard Lin > > > Subject: Re: timeZone and day light saving time > > > > > > > > > can you supply a listing of the code > > > i'm a novice on the timezone front > > > > > > tia > > > mike > > > > > > ----- Original Message ----- > > > From: "Howard Lin" <[EMAIL PROTECTED]> > > > To: "Tag Libraries Users List" <[EMAIL PROTECTED]> > > > Sent: Thursday, June 12, 2003 10:53 AM > > > Subject: RE: timeZone and day light saving time > > > > > > > > > I found a solution myself. Just in case anybody else wants to > > > do the same > > > thing, here is what I did: create a SimpleTimeZone in a > > > script with DST > > > rule, and then set this timezone in the pageContext. Then > using this > > > timezone in <fmt:parseDate> or <fmt:formatDate>. It works. > > > > > > Howard Lin > > > > > > > -----Original Message----- > > > > From: Howard Lin > > > > Sent: Wednesday, June 11, 2003 3:08 PM > > > > To: 'Tag Libraries Users List' (E-mail) > > > > Subject: timeZone and day light saving time > > > > > > > > > > > > It seems that there is no way to specify Day Light Saving > > > > Time rule in <fmt:timeZone> or <fmt:setTimeZone> since it's > > > > implemented as Java TimeZone, not SimpleTimeZone. Is there > > > > way to specify day light saving timezone? Thanks, > > > > > > > > Howard Lin > > -- > Kris Schneider <mailto:[EMAIL PROTECTED]> > D.O.Tech <http://www.dotech.com/> > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
