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

VulpesRank #55 · 29.2K reputationPosted May 30, 2012, 2:24 AM EDT
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.
EhteshamRank #3,979 · 374 reputationPosted May 29, 2012, 2:39 AM EDT
for instance
DateTime dt=DateTime.Now;
Label1.Text=dt.tostring("dd/MM/yyyy");
mithun kumar20 reputationPosted May 29, 2012, 2:54 AM EDT
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.
VulpesRank #55 · 29.2K reputationPosted May 29, 2012, 7:11 AM EDT
mithun kumar20 reputationPosted May 29, 2012, 10:49 PM EDT
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.