var offset=-8; //offset from UTC
var luckyday=new Date(Date.UTC(2008,7,8,(20 + offset ),8);
document.write(" The 2008 Olympics starts at " + luckyday.toUTCString());
document.write(" In local time this is " + luckyday.toLocaleString())
Note: In the example above, I converted from Beijing time to UTC by adding the offset from UTC ("-8") to the Beijing time - this is why argument 4 of Date.UTC reads "(20 + offset)" above.
Date.UTC( year, month[, day, [hour, [minutes, [seconds, [milliseconds]]]]])
converts the given date into milliseconds since January 1, 1970.
U.S. Naval Observatory. "What is Universal Time?." 30 October 2003. U.S. Naval Observatory, Astronomical Applications Department. 6 July 2007. <http://aa.usno.navy.mil/faq/docs/UT.html>