星期五, 7月 30, 2010

DateTime to time_t (GMT) in Java script

DateTime to time_t (GMT) in Java script


<script type="text/javascript">
var dd = new Date(2010,06,28,18,13,22,00)
//var d = Date.parse( dd );
//document.write(d)

//document.write( Date.UTC(2010,06,28,18,13,22,00) );
var x = dd.toUTCString();

document.write(Date.parse(x));
</script>