Knowledge Base Nr: 00332 timestamp.java - http://www.swe-kaiser.de

Downloads:

Java: GWT: unix timestamp als text

  
public static String GetTimestampText(long ts)
{
java.util.Date date = new java.util.Date(ts * 1000); //umrechnen unix nach javascript
DateTimeFormat fmt = DateTimeFormat.getFormat("dd.MM.yyyy HH:mm:ss");
String sTimestamp = fmt.format(date);

return sTimestamp;
}