Hi all, After hours of hair tearing, I think I have found what went wrong. In one word, this is a problem of conflicting time zone standards between the one used by Linux and the one used by Java. I switched between different time zones (of different countries). I found that Michael Sinz (thank you!!) was correct. Java always reads GMT. But Java presents it according to a specific time zone (whatever it can read from OS, even the time zone is not correctly read). So the solution is to use calendar and time zone classes with Java. However I wrote a C program, which has no problem of reading the time at all. By the way, I did try the OS configuration files of localtime and posixrules. I am positive that the OS timezone was set correctly. cheers Gangmeng ---------------------------------------------------------------------- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]