it is UTC guys
by default javascript date object is UTC. All dates are calculated in milliseconds from 01 January, 1970 00:00:00 Universal Time (UTC) with a day containing 86,400,000 milliseconds.
refer: http://www.w3schools.c om/js/js_obj_date.asp (W3Schools, JavaScript Date Object).
User Profile
Collapse
-
the corrected one!
UTC should be taken into consideration!!
Code:private Int64 GetTime() { Int64 retval=0; DateTime st=DateTime(1970,1,1); TimeSpan t= (DateTime.Now.ToUniversalTime()-st); retval= (Int64)(t.TotalMilliseconds+0.5) return retval; }Leave a comment:
-
The corrected one!
if you are using a system, where the current time is not in UTC, then this will not work. javascript getTime gets the diff with UTC.
# private Int64 GetTime()
# {
# Int64 retval=0;
# DateTime st=DateTime(197 0,1,1);
# TimeSpan t= (DateTime.Now.T oUniversalTime( )-st);
# retval= (Int64)(t.Total Milliseconds+0. 5)
# return retval;
# }Leave a comment:
No activity results to display
Show More
Leave a comment: