Thus I came up with the following:
<script language="jscript" runat="server">
function TimestampFromUTC( sUTC ) {
return Date.parse(sUTC) / 1000; // seconds rather than milliseconds
}
</script>
<script language="vbscript" runat="server">
Function DateFromTimestamp( iTimestamp )
DateFromTimestamp = DateAdd( "s", iTimestamp, "01/01/1970 00:00:00" )
End Function
</script>
Usage: DateFromTimestamp( TimestampFromUTC( s ) )
No comments:
Post a Comment