I am trying to parse a timestamp into a human-readable date string, however, I keep getting 1/15/1970 as a return.
//Here is my formatter
DateTimeFormat Format = DateTimeFormat.getFormat("MM/dd/yyyy");
//Here is my timestamp - SHOULD BE AUGUST 16TH, 2010
String date = "1281966439";
//Here is where I create the date, and format it
int intDate = Integer.parseInt(date);
Date eventDate = new Date(intDate);
String eventDateFinal = Format.format(eventDate);
//In this alert, I get 1/15/1970
Window.alert(eventFinal);
I thought I might be using milliseconds instead of seconds, but when I feed it the value in milliseconds, I get an exception.
Anyone ever have this problem?