So if i see '1328571956' as the value for the current visit, how do I decode that to a readable value?
thx
So if i see '1328571956' as the value for the current visit, how do I decode that to a readable value?
thx
It's a UNIX timestamp. For decoding it into a usable JavaScript date object, there's this: Convert a Unix timestamp to time in JavaScript
As @wooble above stated... "That's seconds after the start of the UNIX epoch (1 Jan 1970, 0:00 UTC)"
To use it though, do this...
var date = new Date(1328571956).toString();
don't forget to multiply seconds by 1000 for unix to javascript timestamps:
Date.fromUnix=function(n){
return new Date(n*1000);
}
alert(Date.fromUnix(1328571956).toUTCString());