Thanks for Alexey's input.
Hi Marc,
ASP.NET globalization can help you do some UI rendering or time/currency
formatting depend on the UICulture and Culture info you set for the ASP.NET
worker thread.
#How to: Set the Culture and UI Culture for ASP.NET Web Page Globalization
http://msdn2.microsoft.com/en-us/library/bz9tc508.aspx
However, for Datetime of remote client user, ASP.NET/http request won't
send such information(only some user-language info will be sent).
Therefore, the reasonable approach would be:
1. You may let the user choose their timezone(stored as a profile item of
each user) and on the page where you need to display datetime, you may
manually calculate the correct time via the timezone offset in current
user's profile.
2. Stored a static timezone offset in web.config file and retrieve it at
runtime when you want to display time info.
Also, is it possible that you use UTC time for all the users?
Sincerely,
Steven Cheng
Microsoft MSDN Online Support Lead
==================================================
Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/subscriptions/managednewsgroups/default.aspx#notif
ications.
Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
where an initial response from the community or a Microsoft Support
Engineer within 1 business day is acceptable. Please note that each follow
up response may take approximately 2 business days as the support
professional working with you may need further investigation to reach the
most efficient resolution. The offering is not appropriate for situations
that require urgent, real-time or phone-based interactions or complex
project analysis and dump analysis issues. Issues of this nature are best
handled working with a dedicated Microsoft Support Engineer by contacting
Microsoft Customer Support Services (CSS) at
http://msdn.microsoft.com/subscriptions/support/default.aspx.
==================================================
This posting is provided "AS IS" with no warranties, and confers no rights.
--------------------
>From: Alexey Smirnov <alexey.smirnov@gmail.com>
>Newsgroups: microsoft.public.dotnet.framework.aspnet
>Subject: Re: local time for remote users
>Date: Tue, 19 Feb 2008 10:48:19 -0800 (PST)
>> I have an aspnet/sql2005 app that supports a set of local users in a
>> manufacturing environment. I (thoughtlessly) built it using SQL's GetDate()
[quoted text clipped - 10 lines]
>> Obviously I haven't worked with internationalization apps before and said
>> "Oh, yeah, hadn't thought of that..." when the client called and asked
why> the far east userswere saying that timestamps were off by 13 hours.
I'm going
>> to have to fix this, but fortunately they haven't asked for output in
>> Cantonese.
[quoted text clipped - 4 lines]
>>
>> If it helps, I think that I should have timestamps in the database
reflect> the user's local time since in THIS case, the local and far east
plants
>> represent different business units and the data will not be combined for
>> reporting purposes (i.e., I don't have the general problem of users from
[quoted text clipped - 19 lines]
>having the offset settings in the user profile (or based on a client
>IP address, etc.)