473,396 Members | 2,052 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,396 software developers and data experts.

Time Zone and DateTime voes.

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
windows application and middle tier runs on IIS. Data is passed between the
client and middle tier as DataSets and custom value object classes. The
problem in my hand is that the client application is deployed in different
time zones and the middle tier is in Eastern Time Zone. So the users in time
zones different from eastern time zone see the datetime adjusted to their
local time, which messes up the system. A lot of the datetimes we use are
just for storing dates only the time part is 00:00:00 and the problem is
some user whoose time zone is behind eastern time see this the date is off
by a day.
On searching internet some of the alternatives I found was to convert
datetiemes into string which is not possible in my case becase I have date
calculation going on the client.
What are my options here to rectify this issue ?

Thanks in advance.

--

Satish
Oct 16 '06 #1
3 2718
Satish,

I recommend storing, calculating, and manipulating times in UTC. When
it comes time to display the time to the end user then convert to the
local time zone. There are several advantages with this approach. Any
mistakes made in converting to the local time zone aren't as critical
since it only effects how the data is displayed and not how it's stored
or calculated. Also, you can completely ignore the effects of daylight
saving time except where displayed to the end user. The daylight
saving time logic can get a little complicated especially when dealing
with multiple time zones that have different definitions of it. Or
worse, the definitions change with time (ie. the United States will use
a different definition starting next year). And of course, you can
always assume 24 hours in a day when using UTC.

Brian

On Oct 16, 1:18 pm, "Satish Itty" <NO_SPAMsitty@claytonDOTcomwrote:
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
windows application and middle tier runs on IIS. Data is passed between the
client and middle tier as DataSets and custom value object classes. The
problem in my hand is that the client application is deployed in different
time zones and the middle tier is in Eastern Time Zone. So the users in time
zones different from eastern time zone see the datetime adjusted to their
local time, which messes up the system. A lot of the datetimes we use are
just for storing dates only the time part is 00:00:00 and the problem is
some user whoose time zone is behind eastern time see this the date is off
by a day.
On searching internet some of the alternatives I found was to convert
datetiemes into string which is not possible in my case becase I have date
calculation going on the client.
What are my options here to rectify this issue ?

Thanks in advance.

--

Satish
Oct 17 '06 #2
My problem is that for most of the cases I'm storing only the dates so I
dont really want them to converted to local time. Every user no matter what
time zone they are in should see the same date. But since Im using the date
time variable with time part as 00:00:00 when it get converted to the local
time of a time zone behind the server all the dates are off by a day.

--
HTH
Satish
"Brian Gideon" <br*********@yahoo.comwrote in message
news:11*********************@m7g2000cwm.googlegrou ps.com...
Satish,

I recommend storing, calculating, and manipulating times in UTC. When
it comes time to display the time to the end user then convert to the
local time zone. There are several advantages with this approach. Any
mistakes made in converting to the local time zone aren't as critical
since it only effects how the data is displayed and not how it's stored
or calculated. Also, you can completely ignore the effects of daylight
saving time except where displayed to the end user. The daylight
saving time logic can get a little complicated especially when dealing
with multiple time zones that have different definitions of it. Or
worse, the definitions change with time (ie. the United States will use
a different definition starting next year). And of course, you can
always assume 24 hours in a day when using UTC.

Brian

On Oct 16, 1:18 pm, "Satish Itty" <NO_SPAMsitty@claytonDOTcomwrote:
>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
windows application and middle tier runs on IIS. Data is passed between
the
client and middle tier as DataSets and custom value object classes. The
problem in my hand is that the client application is deployed in
different
time zones and the middle tier is in Eastern Time Zone. So the users in
time
zones different from eastern time zone see the datetime adjusted to their
local time, which messes up the system. A lot of the datetimes we use are
just for storing dates only the time part is 00:00:00 and the problem is
some user whoose time zone is behind eastern time see this the date is
off
by a day.
On searching internet some of the alternatives I found was to convert
datetiemes into string which is not possible in my case becase I have
date
calculation going on the client.
What are my options here to rectify this issue ?

Thanks in advance.

--

Satish

Oct 17 '06 #3
PS

"Satish Itty" <NO_SPAMsitty@claytonDOTcomwrote in message
news:eE**************@TK2MSFTNGP05.phx.gbl...
My problem is that for most of the cases I'm storing only the dates so I
dont really want them to converted to local time. Every user no matter
what time zone they are in should see the same date.
To see the same date they must also see the same time, i.e. at midnight
everyone no matter where they are moves to a new day. So base everything on
one time zone and that's what the time is no matter where you are in the
world.

PS

But since Im using the date
time variable with time part as 00:00:00 when it get converted to the
local time of a time zone behind the server all the dates are off by a
day.
>
--
HTH
Satish
"Brian Gideon" <br*********@yahoo.comwrote in message
news:11*********************@m7g2000cwm.googlegrou ps.com...
>Satish,

I recommend storing, calculating, and manipulating times in UTC. When
it comes time to display the time to the end user then convert to the
local time zone. There are several advantages with this approach. Any
mistakes made in converting to the local time zone aren't as critical
since it only effects how the data is displayed and not how it's stored
or calculated. Also, you can completely ignore the effects of daylight
saving time except where displayed to the end user. The daylight
saving time logic can get a little complicated especially when dealing
with multiple time zones that have different definitions of it. Or
worse, the definitions change with time (ie. the United States will use
a different definition starting next year). And of course, you can
always assume 24 hours in a day when using UTC.

Brian

On Oct 16, 1:18 pm, "Satish Itty" <NO_SPAMsitty@claytonDOTcomwrote:
>>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
windows application and middle tier runs on IIS. Data is passed between
the
client and middle tier as DataSets and custom value object classes. The
problem in my hand is that the client application is deployed in
different
time zones and the middle tier is in Eastern Time Zone. So the users in
time
zones different from eastern time zone see the datetime adjusted to
their
local time, which messes up the system. A lot of the datetimes we use
are
just for storing dates only the time part is 00:00:00 and the problem is
some user whoose time zone is behind eastern time see this the date is
off
by a day.
On searching internet some of the alternatives I found was to convert
datetiemes into string which is not possible in my case becase I have
date
calculation going on the client.
What are my options here to rectify this issue ?

Thanks in advance.

--

Satish

Oct 18 '06 #4

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 ...
1
by: Drew | last post by:
Is there a way to check if it is daylight savings or not via c#? I have heard you can use System.Globalization? Thanks - Drew
4
by: P. George | last post by:
i have a table with a 'timstamp with time zone' column. when i insert into it: '18 Nov 2004 00:00:00 PST' ....it looks like: 2004-11-18 03:00:00-05
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):"+...
15
by: Cesar Ronchese | last post by:
Hi, I built the sample code showing the problem with dates when viewed at different machines, different Time Zones and transported via Remoting. The zip can be downloaded here: ...
3
by: Randall Parker | last post by:
Suppose one has a database of UTC times that are from different dates in the past. The problem with translating those times to a local time is that one does not know for each UTC time whether the...
3
by: bwooster47 | last post by:
Following python code prints out incorrect UTC Offset - the python docs say that %z is not fully supported on all platforms - but on Linux Fedora FC5, perl code works and python does not - is this...
2
by: nightwatch77 | last post by:
Hi, does anyone know why .Net incorrectly handles time zone conversion when passing DateTime through web services? The problem is that it seems to ignore the time zone part. My time zone is CEST,...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

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.