Thread: Odd Timestamp
View Single Post
  #2 (permalink)  
Old 09-26-2006, 08:48 PM
brackett brackett is offline
Programmer
 
Join Date: May 2006
Posts: 193
Credits: 0
Rep Power: 11
brackett is on a distinguished road
Default

I'd guess it's a UNIX timestamp - meaning, the number of seconds since 1/1/1970. In this case, it converts to 9/27/05 16:00:26 (GMT).

I don't think there's any built in conversion in .NET, so you'd just do it manually:
Code:
private static DateTime EPOCH = DateTime.Parse("1/1/1970")
public static DateTime UnixToDateTime(int timestamp) {
   return (EPOCH + TimeSpan.FromSeconds(timestamp)).ToLocalTime()
}
Reply With Quote