Author Message

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

Thu, 19 Oct 2000 03:00:00 GMT  
 [ 1 post ] 

 Relevant Pages 

1. Automatic DateTime formating between TimeZones?

2. Date and Time in Different Timezones

3. time_t, tm*, and timezones (please read!)

4. Q: conversion between timezones

5. time_t, tm*, and timezones (please read!)

6. !! Fun With Timezones !!

7. Timezones

8. Timezones

9. Timezones

10. timezones and universal coordinated time

11. TimeZones Abbreviated

12. Timezones - who can answer this


Powered by phpBB® Forum Software