473,473 Members | 2,144 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

How to send 10/29/06 01:30 CST? - WebServices,DateTimes, and Timezones

My computer is a client in the central timezone with daylight savings.

I need to pass a time and a value to the server via webservices (for example, the price of electricity at each hour in the future). Suppose I want to send these four times and values to the server:
2006-10-29 05:30 GMT, $1.50
2006-10-29 06:30 GMT, $1.60
2006-10-29 07:30 GMT, $1.23
2006-10-29 08:30 GMT, $1.35

Since my computer is in the central timezone, there is no way I can find to create a time equivalent to the 7:30 GMT time. It should interpret these times as:
12:30 AM CDT (05:30 GMT)
1:30 AM CDT (06:30 GMT)
<----- (clocks roll back to standard time)
1:30 AM CST (07:30 GMT)
2:30 AM CST (08:30 GMT)

Based on my observations with the .ToUniversalTime method, you get only these times:
12:30 AM CDT (05:30 GMT)
1:30 AM CDT (06:30 GMT)
2:30 AM CST (08:30 GMT)
7:30 GMT can't be represented.
Similarly, 6:30 GMT can't be represented on a client in the eastern time zone.

How can I send the missing hour to a webservice? I can't change the time on the client machine and I change the server side method to accept a different data type.

The only solutions I can think of so far are to set my app to run in a timezone that doesn't use daylight savings (I'm not sure it that is possible without changing the client's system clock) or override the deserialization/serialization to get/set the timezone part of the xml message. I don't know how to do either of these, so I hope there is a simple example somewhere or a different option.

I realize I'll have to handle timezone conversions within my client code. Assuming I can keep things straight, however, my main concern is being able to communicate an instant in time to the server when it falls within the first hour of the switch back to "standard time".

Please advise. Thank you.
-Bill

Mar 3 '06 #1
0 985

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

Similar topics

4
by: Michael Pfeifer | last post by:
Hi all, I need to convert datetimes from any timezone to UTC and back considering daylight saving. It is not enough, to just add or subtract the timezone offset. Also, I can not use c functions...
4
by: Martijn van Oosterhout | last post by:
Hi, The operating system I run (Linux) comes with many, many timezone files for many different places in the world. For example: $ TZ='Australia/Sydney' date Fri Oct 8 06:15:31 EST 2004 $...
8
by: Komandur Kannan | last post by:
We have a smart device application running on handhelds(Symbol MC9000G). The backend is Oracle and a middle tier web services development done in Vb.net. We use pessimistic Locking due to...
0
by: Bill | last post by:
(Sorry if this is a duplicate post. I'm not sure if my newsreader was set up right.) --------------------------------- My computer is a client in the central timezone with daylight savings. I...
3
by: Pieter Coucke | last post by:
Hi, For some reason, somewhere in my application 1 hour is added to my dates, depending in which time zone the application is run... Because I don't have a clue where this happens, I posted this...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
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
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
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...
1
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...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
muto222
php
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.