Get Java Script Time


/ Published in: C#
Save to your folder(s)

drunkenprogrammer


Copy this code and paste it in your HTML
  1. public static string GetJavaScriptTime()
  2. {
  3. Int64 retval = 0;
  4. DateTime st = new DateTime(1970, 1, 1);
  5. TimeSpan t = (DateTime.Now - st);
  6. retval = (Int64)(t.TotalMilliseconds + 0.5);
  7. retval = retval + 1000000;
  8. return retval.ToString();
  9. }

URL: ideabubbling.com

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.