Timestamp conversion

I can't find anything helpful on google
Strange. First hit on "unix timestamp" gives the wikipedia article, which nicely explains almost anything and most importantly tells us that 1/1/1970 00:00 is the starting date for counting the seconds ...

VB.NET:
Public Function UnixTimeStampToSomethingMoreReadable(ByVal ut As Int64) As DateTime
        Return #1/1/1970#.AddSeconds(ut)
    End Function
 
Umm.. so if it's the number of the seconds from the epoch (this is kinda like.. the clean way that a C# coder would write):

Dim epoch as New DateTime(1970, 1, 1)

Dim nixTime as DateTime = epoch.AddSeconds(1235678273)



Darnit. How bummed out do I feel, not doing anything to celebrate 5:31pm, 13 days ago

(The unix time was 1234567890 on Feb 13th 2009 at 5:31)
 
Back
Top