date and time

  • Thread starter Thread starter Anton ml. Vahèiè
  • Start date Start date
A

Anton ml. Vahèiè

Hi,

Can somebody tell me how I get local time (user's browser time - not server
time)? Which function do I call in c# asp.net?

Anton, ml.
 
I don't believe you can't call any server-side code to do this. If you want
the clients time, they're going to have to give it to you, through
javascript and a form post/querystring. I'd set a hidden form field =
Date();

HTH,
--Michael
 
You could probably use getTimezoneOffset client side but I would still
suggest to keep working using GMT based date and times for consistency (else
you'll have problems to know if someone performed something before or after
someone else if you keep the data in both user local time).

Patrice
 
Back
Top