I've spent a while looking through the InfoViewer pages, but I can't find
what I'm looking for. Thought maybe I should ask the experts...
Basically I'm writing an ActiveX control that needs to find out what time it
is, at a given point in the world. I want to provide a time zone and be
told what the current time is, in that time zone. I would be nice to be
able to get the current date as well, but that is less important.
I've already written this as a JavaBean, and so perhaps it would be best to
show how I'm currently doing this;
// Find the current time in the Mid-West
//
TimeZone cst = new TimeZone("CST");
Calendar chicago = Calendar.getInstance(cst);
// And the time on the East coast
//
TimeZone est = new TimeZone("EST");
Calendar boston = Calendar.getInstance(est);
These return references to Calendar objects which are initialised to the
current date and time.
Please can anyone give me a clue what sort of things I should be looking at
in the help pages? Or better yet a short piece of example code...
Thanks in advance
- Graham