Javascript: convert seconds to a date object

function toDateTime(secs) {
    var t = new Date(1970, 0, 1); // Epoch
    t.setSeconds(secs);
    return t;
}

Comments

Popular posts from this blog

Cách khắc phục lỗi NodeJS chạy quá ngốn Ram trên Visual Studio 2017

ADO .NET vs ASP .NET