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 derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Problems with time (GMT/BST)

Status
Not open for further replies.

Piloria

IS-IT--Management
Mar 12, 2002
435
GB
when querieing the server for system time on an AIX platform we are getting the systems GMT time (not modified for British sumer time) when the same code is run on a windows machine it returns the correct BST time.

TimeZone.setDefault(TimeZone.getTimeZone("Europe/London"));
DateFormat britStdDf = DateFormat.getTimeInstance(DateFormat.LONG, Locale.UK);
GregorianCalendar britStdCal = new GregorianCalendar();
System.out.println("the current hrs is " + britStdCal.get(Calendar.HOUR_OF_DAY));
System.out.println("the current min is " + britStdCal.get(Calendar.MINUTE));
System.out.println("the current sec is " + britStdCal.get(Calendar.SECOND));
System.out.println("the day of week is " + britStdCal.get(Calendar.DAY_OF_WEEK));
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top