Stretchwickster
Programmer
Hi,
I'm currently displaying the time (GMT) but it's an hour out because of British Summer Time. Is there a method I can use to correct this automatically?
My code is as follows:
TimeZone timeZone = TimeZone.getDefault();
timeZone.setID("GMT"
calendar = Calendar.getInstance(timeZone);
timeString = timeFormatter.format(calendar.getTime());
timeLabel.setText(timeString.toString());
dateString = dateFormatter.format(calendar.getTime());
dateLabel.setText(dateString.toString());
Your help would be much appreciated
I'm currently displaying the time (GMT) but it's an hour out because of British Summer Time. Is there a method I can use to correct this automatically?
My code is as follows:
TimeZone timeZone = TimeZone.getDefault();
timeZone.setID("GMT"
calendar = Calendar.getInstance(timeZone);
timeString = timeFormatter.format(calendar.getTime());
timeLabel.setText(timeString.toString());
dateString = dateFormatter.format(calendar.getTime());
dateLabel.setText(dateString.toString());
Your help would be much appreciated