Click here to Skip to main content
15,883,901 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
Hi everyone :),

I have a web application that hosted on server in USA.

My problem is when DateTime.Now called it retrieve the DateTime.Now at USA, but i want my application to retrieve the Egypt DateTime.Now (since all my users are in Egypt) without change any line of code by another meaning i want to know if there is a configuration solution to this problem.

Thanks in advance :)
Posted

This is due to the "Culture" for your application. By default it is en-us. Check this how to from MSDN:

http://msdn.microsoft.com/en-us/library/bb882561.aspx[^]

This has a broader scope but helpful nevertheless!

http://msdn.microsoft.com/en-us/library/c6zyy3s9(v=vs.100).aspx[^]


Hope this helps!
 
Share this answer
 
Use ust time + your time range from utc... like india 5:30...

example: for India :

select getutcdate()+'5:30'

give the proper time of india... :)
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900