469,921 Members | 2,221 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,921 developers. It's quick & easy.

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 2479
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 discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

3 posts views Thread by Jon Davis | last post: by
10 posts views Thread by Marc Pelletier | last post: by
1 post views Thread by Drew | last post: by
4 posts views Thread by P. George | last post: by
4 posts views Thread by Maziar Aflatoun | last post: by
3 posts views Thread by Randall Parker | last post: by
reply views Thread by Waqarahmed | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.