none
Problem with date time value with Web server RRS feed

  • Question

  •  

    Hi,

    Problem with date time value with Web server

    We have two application running in a web server(IIS), one application is for UK user's and other for UAE user's.

    Can we do anything that application caters to the time zone for UAE and UK users running on same iis.

    solution other than utc, client script time zone change,zone change using current thread are appreciable

    Thanks in Advance,

    KCube

    Friday, August 1, 2008 9:44 AM

All replies

  • Could you give an example of the problem?
    Friday, August 1, 2008 3:06 PM
  • HI,

    For example,

    DateTime.Now should renter uae time for one application and uk time in other application. 

     

    Monday, August 4, 2008 4:48 AM
  • The toolset for internationalization and localization are very rich.  Look at the presentation that has some samples of how to use cultureinfo with datetime function (http://www.slideshare.net/rishikothari/microsoft-net-development-platform-internationalization/) and asp.net page directive to make the web forms international aware(http://msdn.microsoft.com/en-us/goglobal/bb688110.aspx)...  The samples provided may be more towards formating, but it you dig deep enough you may find the example for calculating time accordingly.   Let me try some and get back to you if you dont find answer.
    Monday, August 4, 2008 1:58 PM
  • I've not read the links in the last post (sorry) but for me I would go one of two routes, either;
    1. Read the culture of the client and store in the users session or hold onto it for the 'session'. Any presentation code should then use that culture when doing things like displaying the time.
    2. Change the presentation thread to use the clients culture

    One of the problems with (2) is that you may not want your browsers culture. For example, you maybe a British person visiting the US and using a US computer. But you select the little British flag on the site so your session is British but the browsers client culture is US. You could combine (1+2) and change the thread to the one in the session, the choice is yours!

    Monday, August 4, 2008 6:57 PM