Return to Snippet

Revision: 4522
at December 29, 2007 01:57 by zvasanth


Initial Code
public static string GetJavaScriptTime()
        {
            Int64 retval = 0;
            DateTime st = new DateTime(1970, 1, 1);
            TimeSpan t = (DateTime.Now - st);
            retval = (Int64)(t.TotalMilliseconds + 0.5);
            retval = retval + 1000000;
            return retval.ToString();
        }

Initial URL
ideabubbling.com

Initial Description
drunkenprogrammer

Initial Title
Get Java Script Time

Initial Tags
javascript, java, script

Initial Language
C#