How to get Browser time

Posted by Thiyagaa under ASP.NET on 1/10/2012 | Points: 10 | Views : 2394 | Status : [Member] | Replies : 2
i am developing web application.
i published my webapplication in the webserver. my webserver is located in india.
both indian & US users will use my project. i have to get & insert user's local machine machine time.
problem here the current user's machine time only returns the webserver time so i am getting indian time for US users.

so any one please tell me how to solve this issue.




Responses

Posted by: Qazitanzeel on: 1/11/2012 [Member] Starter | Points: 25

Up
0
Down
If you are talking about server response time, then it can be handled by
the following code

static int timeout;

protected void Page_Init(object sender, EventArgs e)
{
timeout=Server.ScriptTimeout; // I am saving the response time to a static variable so that i can set it again on unload event
Server.ScriptTimeout = 3600; // This will extend the response time to on hour,

}
protected void Page_UnLoad(object sender, EventArgs e)
{
Server.ScriptTimeout = timeout;

}


Thiyagaa, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Qazitanzeel on: 1/11/2012 [Member] Starter | Points: 25

Up
0
Down
Sorry about the ist answer, I was reading a question about timeout in another question. so i replied that to you.

This link will help you in this regard
http://stackoverflow.com/questions/179940/c-sharp-convert-utc-gmt-time-to-local-time

Thiyagaa, if this helps please login to Mark As Answer. | Alert Moderator

Login to post response