Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / General / November 2007

Tip: Looking for answers? Try searching our database.

World Clock

Thread view: 
abhinavchadda - 23 Sep 2007 16:23 GMT
Hi,
I am working on developing a world clock for my personal use.. i've
made the analog clock in flash and everything is working fine but the
problem is i am not getting it to correct the Daylight savings time.
The implemetation details are as follows.
Jsp page has 4 combo boxes with the location names and the value of it
is set as the time zone offset. This value is sent to the flash file
which takes the UTC time and adds  the TZ offset to it and displays
the time. the problem is How do i detect if the particular zone has
DST or not?
Real Gagnon - 23 Sep 2007 16:47 GMT
> I am working on developing a world clock for my personal use.. i've
> made the analog clock in flash and everything is working fine but the
[quoted text clipped - 5 lines]
> the time. the problem is How do i detect if the particular zone has
> DST or not?

You get the DST value by calling TimeZone.getDSTSavings(). Add the value to
TimeZone.getRawOffset() and divide by 3600000.

Example at  http://www.rgagnon.com/javadetails/java-0589.html

Bye.
Signature

Real Gagnon  from  Quebec, Canada
* Java, Javascript, VBScript and PowerBuilder code snippets
* http://www.rgagnon.com/howto.html
* http://www.rgagnon.com/bigindex.html

Roedy Green - 23 Sep 2007 23:12 GMT
On Sun, 23 Sep 2007 15:23:13 -0000, abhinavchadda
<abhinavchadda@gmail.com> wrote, quoted or indirectly quoted someone
who said :

> the problem is How do i detect if the particular zone has
>DST or not?

See http://mindprod.com/jgloss/timezone.html

look at the source code for the Applet on that page.
Signature

Roedy Green Canadian Mind Products
The Java Glossary
http://mindprod.com

Sabine Dinis Blochberger - 24 Sep 2007 12:42 GMT
> Hi,
> I am working on developing a world clock for my personal use.. i've
[quoted text clipped - 6 lines]
> the time. the problem is How do i detect if the particular zone has
> DST or not?

I wonder if the date parts of ICU4J (http://www.icu-project.org/) would
be of any use to you. Best wishes.
Signature

Sabine Dinis Blochberger

Op3racional
www.op3racional.eu

abhinavchadda - 05 Nov 2007 18:36 GMT
On Sep 24, 4:42 pm, Sabine Dinis Blochberger <no.s...@here.invalid>
wrote:
> > Hi,
> > I am working on developing a world clock for my personal use.. i've
[quoted text clipped - 13 lines]
>
> Op3racionalwww.op3racional.eu

Hi guys...

Thanks for your replies....
I have used a different approach, I have mapped the timezones to the
Java Timezones and whenever the user selects a different timezone, an
Ajax call is made to check whether tht timezone is in DST or not and
then automatically the timeis adjusted ...


Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.