Hi friends,
I have one problem.i have hosted my web site in my server that server is in kuwait.when i am trying to open this web site from India.the Date time is showing Kuwait standerd , but i need Indian standerd...how to fix this...please help me on this.
Thanks & Regards,
Mithun.
Loading
VulpesPosted May 30, 2012, 6:24 AM
If the site will mostly be accessed from India, you could therefore show the Indian Standard Time by default and perhaps have an option on the home page for the user to choose to show the time in Kuwait or whatever his/her location happens to be. The server could then respond accordingly.
Another possibility would be to try and use client side scripting (i.e. javascript) to deduce the location of the client and hence the current time in that location.
mithun kumarPosted May 30, 2012, 2:49 AM
Thanks for your reply...you mean i have to put condition in my code if somebody is openning the web site from india then the Date time will be this.
DateTime ast = DateTime.Now;
DateTime ist = ast.AddHours(2.5);
Or if it is from Kuwait...
DateTime ast = DateTime.Now;
Because This site will open only with indian Employee and here(Kuwait)...so it will be the better option or somthing else i should do.
Thanks & Regards,
Mithun.
VulpesPosted May 29, 2012, 11:11 AM
mithun kumarPosted May 29, 2012, 6:54 AM
I have one problem.i have hosted my web site in my server that server is in kuwait.when i am trying to open this web site from India.the Date time is showing Kuwait standerd , but i need Indian standerd...how to fix this...please help me on this.
Thanks & Regards,
Mithun.
EhteshamPosted May 29, 2012, 6:39 AM
for instance
DateTime dt=DateTime.Now;
Label1.Text=dt.tostring("dd/MM/yyyy");