according to TID 3655154 the following test code can be used

I trie to copy this code into a editor, named it gave it 777
permisions and ran the script to get a short list of command not found and
syntax errors followed by nothing. what is this TID trying to have me do,
is there another way to verify that my java is ready for this weekends
upcoming change.

below is copied from the TID

Thank you,


Validating DST changes for Java

To validate whether DST changes occur on the correct date for Java code,
the following test code can be used:

import java.util.*;
import java.text.*;

class testdst {
public static void main(String args[]){
if((args.length != 4)){
if((args.length == 1) && args[0].equals("-list")){
System.out.println("Available time zones
String[] list = TimeZone.getAvailableIDs();
int i;

for(i = 0; i < list.length; i++)
} else {
System.out.println("Usage testdst
<timezone> <year> <month> <day>");
System.out.println("or testdst -list");
TimeZone t = TimeZone.getTimeZone(args[0]);
System.out.println("Using time zone " + t.getDisplayName
System.out.println("Use parameter -list to get a list of
available time zones");
GregorianCalendar cal = new GregorianCalendar(t);
int year = new Integer(args[1]).intValue() - 1900;
int month = new Integer(args[2]).intValue() - 1;
int day = new Integer(args[3]).intValue();

Date d = new Date(year, month, day, 12, 0);
System.out.println("Testing date " +

int offset_day = cal.get(Calendar.DST_OFFSET);
Date d2 = new Date(year, month, day-1, 12, 0);

int offset_preday = cal.get(Calendar.DST_OFFSET);

if(offset_day == offset_preday)
System.out.println("There was no change in the
daylight saving time offset");
System.out.println("The daylight saving time
offset was changed");