Hi all,
I want clarify one thing.
I installed j2sdk1.4.2_03 and jdk1.7 in my system.
when i run the following program it gives two different result in two version of
java
my system timezone setting is -08:00 (Pacific US & Canada )
import java.sql.*;
import java.text.DateFormat;
import java.text.SimpleDateFormat;
import java.text.ParseException;
class DB {
public static void main (
String args []) throws SQLException
{
try {
DateFormat df = new SimpleDateFormat("yyyyMMddHHmmss Z");
Timestamp today = new Timestamp(df.parse("20081027023050 -0800").getTime());
System.out.println("Today = " + df.format(today));
}catch (ParseException e)
{ e.printStackTrace(); }
}
}
when i run this with jdk1.4... it gives 20081027023050 -0800
when i run this with jdk1.7 it gives 20081027033050 -0700
Can anybody clarify this?
Thanks & Regards,
thilsen