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

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

(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 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 can't 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

Mar 3 '06 #1
0 1027

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...
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:
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...
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: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
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...
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
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

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.