473,804 Members | 3,030 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

How to send 10/29/06 01:30 CST? - WebServices,Dat eTimes, 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 .ToUniversalTim e 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 1046

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

Similar topics

4
983
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 and structures like localtime and time_h, since they only can handle datetimes "younger" than 01/01/1970. I need to handle birthday dates also. I tried to integrate Boost libraries (see www.boost.org), but I was not able to get them running...
8
4016
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 specific business needs When such a lock is made for a transaction (this code is in the web service) and the handhelds are terminated abnormally (cold booted or battery low), the lock still remains. The Web service's connection to oracle is still...
0
1004
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 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...
3
1820
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 to the three relevant newsgroups (vb/ado, sql and xml): my aplogize for this. I'm doing a Synchronisation between two SQL Servers (2000): All the Data is read into a DataSet, and exported to an XML-file: SQL Server -> DataSet (VB.NET 2003) ->...
0
9706
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
10571
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10075
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9143
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7615
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6851
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 then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5520
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5651
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
3
2990
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.