Feng-Cheng,
You beat me to the post. I've got a similar, related?, problem. I have
two machines, both running mkLinux DR3. The older runs jdk117_v1a. I've
got a simple directory listing cgi, JFind, running under Apache (I
directly use java, not Jserv, via a shell wrapper). It returns the
correct CST and CDT. The newer machine is running jdk12pre. It returns
EST and EDT, whereas the unix shell command date returns the correct
time zone: CST and CDT. JFind uses the java.util.Date routines:
File f = new File (somefile);
Date d = new Date (f.lastModified ());
Does anyone know what is going on?
Marius
Feng-Cheng wrote:
--
Hello all,
I have a question about the time zone settings:
My Linux box is using local CST time, but the java.lang.Calendar or
java.lang.Date always report CDT...
Here is my program:
----------------
import java.lang.*;
import java.util.*;
public class TestCal {
public static void main(String[] argv) {
Calendar cal = Calendar.getInstance();
System.out.println(cal.getTime());
}
}
----------------
The output of the program is always CDT time.
Could anybody tell me how to solve this problem? thanks.
--
Marius Schamschula, optical physicist, mac, and network coordinator
The Center for Applied Optical Sciences: http://www.caos.aamu.edu/
Department of Physics, Alabama A & M University
----------------------------------------------------------------------
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]