phoung as far as the client datetime is concerned, you can get the timezone
by using the following:
<script language="javascript">
function init()
{
var datNow = new Date();
/// e.g. -8 means the zone is UTC+8
/// e.g. 8 means the zone is UTC -8
/// the offset value is the value that is applied in hours to the
current datetime
/// in order to get the current UTC value
document.forms[0]["offset"].value = datNow.getTimezoneOffset();
}
</script>
<body onload="init();">
<form runat="server">
<input type="hidden" runat="server" id="offset" />
</form>
</body>
caveat
=====
1. If the client has the wrong settings, you will receive the wrong
settings.
phuong said:
Hi Martin,
Thanks for your reply. But what they tried to do in the example is not what
I want to do. That example has tried to convert datetime between the local
timezone of the SERVER machine (not the CLIENT machine) and the UTC
datetime.
What I want to do in my WEB application is let the user at the client side
enter a datetime (using calendar) Then, when the page postback to the server
side, the appplication have to know from which timezone the CLIENT is (note
that: this is a WEB app. There are a thousand of clients from the internet)
and then convert the entered datetime into UTC datetime before saving it
into database. Later when showing the UTC datetime retrieved from our
database, I want first it is converted to the local CLIENT timezone before
show it on the web UI.
Hope, that I have explained my problem clearly. If you need more info,
please feel free to ask.
Thank you very much!!!
Phuong
http://msdn.microsoft.com/library/en-us/cpguide/html/cpconformattingobjectsforspecificculture.asp