473,320 Members | 2,092 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

time zone in wep application.

What is the best way to deal time zone difference in Wep application.

Is there a best pattern and practice for this?
Jan 12 '06 #1
4 1471
I have had good success in using UTC (Universal Timing
Convention/"Zulu"/Greenwich/etc) dates/times. It is even easier (for
you) if you just post them that way on your site... As far as asp.net
goes, the DateTime functions already have UTC built
in...(DateTime.UtcNow instead of DateTime.Now, etc...). Also, in the
case of MS SQL 2005 (and maybe MS SQL 2000?), there are built in
functions also...GETUTCDATE() instead of GETDATE()...etc. This is just
an idea...
Marlon wrote:
What is the best way to deal time zone difference in Wep application.

Is there a best pattern and practice for this?


Jan 12 '06 #2
Thanks Joey,
I am aware of these options.
Are there any built-in communications between browser and server that would
indicate the current time zone for the client computer .

I know that the getTimeZoneOffset method can be used to determine the
difference local time and GMT.
I was just hope that a method was already implemented or a best pratice.

thanks again

"Joey" <jo*********@topscene.com> wrote in message
news:11**********************@o13g2000cwo.googlegr oups.com...
I have had good success in using UTC (Universal Timing
Convention/"Zulu"/Greenwich/etc) dates/times. It is even easier (for
you) if you just post them that way on your site... As far as asp.net
goes, the DateTime functions already have UTC built
in...(DateTime.UtcNow instead of DateTime.Now, etc...). Also, in the
case of MS SQL 2005 (and maybe MS SQL 2000?), there are built in
functions also...GETUTCDATE() instead of GETDATE()...etc. This is just
an idea...
Marlon wrote:
What is the best way to deal time zone difference in Wep application.

Is there a best pattern and practice for this?

Jan 12 '06 #3
Couldn't you use getTimeZoneOffset to apply to UTC and get their local
times?

Jan 12 '06 #4
Thanks for Joey's suggestion.

Hi Marlon,

For ASP.NET application it running on the serverside so it has limited
access to most of the clientside info. And so far for getting clientside
timezone info, you can consider Joey's suggest that use javascript to get
the TimezoneOffset .... e.g:

<script language="javascript">
function Disp_TZ()
{
var dt = new Date();

var offsetMin =dt.getTimezoneOffset()/60;

alert("Your local timezone offset: " + offsetMin + " ");
}
</script>

Thanks,

Steven Cheng
Microsoft Online Support

Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)


--------------------
| From: "Joey" <jo*********@topscene.com>
| Newsgroups: microsoft.public.dotnet.framework.aspnet
| Subject: Re: time zone in wep application.
| Date: 12 Jan 2006 08:20:41 -0800
| Organization: http://groups.google.com
| Lines: 3
| Message-ID: <11**********************@g47g2000cwa.googlegroups .com>
| References: <82**********************************@microsoft.co m>
| <11**********************@o13g2000cwo.googlegroups .com>
| <#L**************@tk2msftngp13.phx.gbl>
| NNTP-Posting-Host: 155.147.14.9
| Mime-Version: 1.0
| Content-Type: text/plain; charset="iso-8859-1"
| X-Trace: posting.google.com 1137082845 22686 127.0.0.1 (12 Jan 2006
16:20:45 GMT)
| X-Complaints-To: gr**********@google.com
| NNTP-Posting-Date: Thu, 12 Jan 2006 16:20:45 +0000 (UTC)
| In-Reply-To: <#L**************@tk2msftngp13.phx.gbl>
| User-Agent: G2/0.2
| X-HTTP-UserAgent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1;
..NET CLR 1.1.4322; .NET CLR 2.0.50727; InfoPath.1; .NET CLR
1.0.3705),gzip(gfe),gzip(gfe)
| Complaints-To: gr**********@google.com
| Injection-Info: g47g2000cwa.googlegroups.com; posting-host=155.147.14.9;
| posting-account=quLkng0AAADPxeWcCK254A0yusgzOfm6
| Path:
TK2MSFTNGXA02.phx.gbl!TK2MSFTNGP08.phx.gbl!newsfee d00.sul.t-online.de!t-onli
ne.de!border2.nntp.dca.giganews.com!border1.nntp.d ca.giganews.com!nntp.gigan
ews.com!postnews.google.com!g47g2000cwa.googlegrou ps.com!not-for-mail
| Xref: TK2MSFTNGXA02.phx.gbl
microsoft.public.dotnet.framework.aspnet:370367
| X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet
|
| Couldn't you use getTimeZoneOffset to apply to UTC and get their local
| times?
|
|

Jan 13 '06 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Jon Davis | last post by:
The date string: "Thu, 17 Jul 2003 12:35:18 PST" The problem: // this fails on PST DateTime myDate = DateTime.Parse("Thu, 17 Jul 2003 12:35:18 PST"); Help? Jon
10
by: Marc Pelletier | last post by:
Hello, I am writing an application that does some simple astronomical calculations. One of the variables I need is the number of hours passed in this year. I've written the following function ...
4
by: Maziar Aflatoun | last post by:
Hi, Can someone please tell me how I can set DateTime to 01/01/1970 (UTC). Doing the following DateTime dt1 = new DateTime(1970, 1,1); Debug.WriteLine("dt1(utc):"+...
14
by: Cesar Ronchese | last post by:
Hello! I've built a program that show some dates to users. I got a problem when users have different configured time zone machines, where: - One machine that determined time zone the date...
2
by: Mike | last post by:
I'm writing an application for Windows XP Embedded. This application requires that the user be able to change the time zone from within the application. I'm trying to do this using...
3
by: Satish Itty | last post by:
Hi all, I have a big problem in my hands and not sure how I can fix this. Any suggestions would be greatly appreciated. I have a .NET 3 tier app developed in VS2003 and .NET 1.1. the client is a...
5
by: Sehboo | last post by:
We have a c# application (with about 100 forms, and 300+ tables on sql server). We have several customers who use that application but everybody gets the copy of the database. Structure of the...
8
by: deepak_kamath_n | last post by:
Hello, I have the following scenario: 1. My application receives the date from another application as a string 2. The other application is running in a different time zone as compared to my...
7
by: Steve | last post by:
Hi All I have a windows application written in VB.net 2005 The users have to select a State of Australia, which I use to check they have the correct windows time zone selected in control panel...
14
by: shapper | last post by:
Hello, Is there any function to convert a Date/Time from UTC to the user client zone and back from user client zone to UTC? I want to store Date/Time in UTC in the database but display it in...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.