What do you mean a nightmare to work with? It seems simple enough from
the code snippet. I think it'd be better to get the system timezone rather
than hardcoding "CST".
> -----Original Message-----
> From: Bhushan Bhangale [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, January 16, 2001 2:25 PM
> To: [EMAIL PROTECTED]
> Subject: Re : how to show timezone specific time
>
>
> Hi All
>
> I did this after a good amount of R&D or you can say hit and
> trial, here is the code snippet....
>
> Calendar c =
> Calendar.getInstance(TimeZone.getTimeZone("CST"), new
> Locale("en", "US");
> c.setTime(new java.util.Date());
> Calendar c1 = Calendar.getInstance();
> c1.set(c.get(c.YEAR), c.get(c.MONTH), c.get(c.DAY_OF_MONTH),
> c.get(c.HOUR_OF_DAY), c.get(c.MINUTE), c.get(c.SECOND));
> System.out.println(c1.getTime());
>
> It works fine. The java date classes are really a nightmare
> to work with.
>
>
> Thanks & Regards
> Bhushan Bhangale
> Consultant
> http://www.netacross.com
> Chequemail.com - a free web based e-mail service that also pays!!!
> http://www.chequemail.com
>
> ==============================================================
> =============
> To unsubscribe: mailto [EMAIL PROTECTED] with body:
> "signoff JSP-INTEREST".
> For digest: mailto [EMAIL PROTECTED] with body: "set
> JSP-INTEREST DIGEST".
> Some relevant FAQs on JSP/Servlets can be found at:
>
> http://java.sun.com/products/jsp/faq.html
> http://www.esperanto.org.nz/jsp/jspfaq.html
> http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
> http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets
>
===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST".
Some relevant FAQs on JSP/Servlets can be found at:
http://java.sun.com/products/jsp/faq.html
http://www.esperanto.org.nz/jsp/jspfaq.html
http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets