Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Calendar Class

Status
Not open for further replies.

calahans

Programmer
Jun 14, 1999
348
IE
I living in the UK and when I get an instance of the calendar class it is giving me the wrong time. It gives me GMT time, which you would think is correct. However, the class is not taking account of daylight savings time!!!

Does anyone know how to get around this>???

Here my code:

Calendar latest = Calendar.getInstance(Locale.getDefault());
latest.add(Calendar.MINUTE,-latestMinutes);
System.out.println("After the calendar SET");
Date strLatest = latest.getTime();

The latest.add is because I'm taking an amount of minutes of(not the problem). [sig]<p>Cal<br><a href=mailto: > </a><br><a href= > </a><br> [/sig]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top