After reading many forum posts and web pages on the correct way to display local time adjusted for daylight savings (summer time) here in the UK, I came up with the code below. This displays raw GMT however with no adjustment.
I am running Java 1.5.0_06 in Netbeans 6.5 on a PC running Windows XP with the timezone set for GMT and "automatically adjust for daylight saving changes" ticked. Is there anything else I need to define for the Java environment or is my code just wrong? If I tear any more hair out I'll soon be bald :-(
SimpleDateFormat df = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss zzzz");
String lvTimestamp = df.format(new Date());