#2033 How to convert unix timestamp to DateTime?

Akcelisto Sat 22 Sep 2012

Unix timestamp is seconds since Jan 01 1970.

tcolar Sat 22 Sep 2012

You could just use fromJava ... although that's in ms rather than seconds ... so you would x1000 first

d := DateTime.fromJava(unixTime * 1000)

Login or Signup to reply.