Subject: Any luck with TS?
Hi Marco,
Have you had any luck resolving this issue of incorrect times on Windows 2008 Terminal Server?
In the Java views, we rely on the JRE to indicate the correct time zone information.
You can run the following TimeTest.class to see what the JRE thinks is the correct time.
Running TimeTest.class to obtain JRE time zone information
import java.util.*;
public class TimeTest{
public static void main(String args){
TimeZone tz = TimeZone.getDefault();
System.out.println(new Date());
System.out.println( tz);
System.out.println( tz.getID()) ;
System.out.println( tz.getDisplayName()) ;
System.out.println( "Curently " + ( tz.inDaylightTime( new Date() ) ? "in " : "not in " ) + "daylight-savings time." ) ;
}
}
Windows
Create a new file named TimeTest.java and paste the above Java code to the file.
Save this file to a local folder, e.g. c:\TimeTest
Open a command prompt
Set the CLASSPATH to include the current directory and the Notes jvm, e.g.,
set CLASSPATH=.;“c:\Program Files\IBM\Lotus\Notes\jvm”
Compile TimeTest, javac
C:\TimeTest>javac TimeTest.java
Run TimeTest.class
java TimeTest.class
A running example,
C:$time>dir
Volume in drive C has no label.
Volume Serial Number is 0E51-61D6
Directory of C:$time
05/25/2010 01:23 PM .
05/25/2010 01:23 PM …
04/21/2010 06:23 PM 943 TimeTest.class
1 File(s) 943 bytes
2 Dir(s) 137,435,549,696 bytes free
C:$time>set CLASSPATH=.;c:\hannover852.0412\jvm
C:$time>java TimeTest.class
Tue May 25 13:23:39 EDT 2010
sun.util.calendar.ZoneInfo[id=“America/New_York”,offset=-18000000,dstSavings=360
0000,useDaylight=true,transitions=235,lastRule=java.util.SimpleTimeZone[id=Ameri
ca/New_York,offset=-18000000,dstSavings=3600000,useDaylight=true,startYear=0,sta
rtMode=3,startMonth=2,startDay=8,startDayOfWeek=1,startTime=7200000,startTimeMod
e=0,endMode=3,endMonth=10,endDay=1,endDayOfWeek=1,endTime=7200000,endTimeMode=0]
]
America/New_York
Eastern Standard Time
Curently in daylight-savings time.
C:$time>