xs:dateTime and timezone problems

Not sure if this is an xml or a ado.net question:

I have created an xml document from a .net dataset which contains a
DateTime column, however all the time elements are set to 00:00:00.
example of xml created:
<Date>2005-06-03T00:00:00.0000000+01:00</Date>

I am based in the UK and my computer timezone is set to GMT (although
the above data may have been created during DST).

If I load this xml document back into a dataset and save the results
into a sql table, I find that the time element remains zero (regardless
of it being DST or not).

If I change my computer timezone to Sydney (GMT + 10) I find that the
time element after importing to the database is either 09:00:00 or
11:00:00 depending on whether the date falls during DST.

This is causing problems as I want the time element to remain
unchanged, no matter what the timezone of the computer reading the xml
back into an sql database.

I am happy to exit the xml file created manually to achieve this.
How can I specify that the time element should not get converted, no
matter what the local timezone?
Any help appreciated.

Stuart Eastland

0
eastlands (1)
1/25/2005 1:43:06 PM
dotnet.xml 7266 articles. 0 followers. Follow

0 Replies
414 Views

Similar Articles

[PageSpeed] 50

Reply:

Similar Artilces:

excell problems
how can i put TWO LINES OF NUMBERS IN ONE CELL <Alt> <Enter> -- HTH, RD ===================================================== Please keep all correspondence within the Group, so all may benefit! ===================================================== "THE JOKER" <THEJOKER@discussions.microsoft.com> wrote in message news:722BE439-FDD8-4EC9-A1ED-9CEE81E85151@microsoft.com... how can i put TWO LINES OF NUMBERS IN ONE CELL Hi, If you want to put two lines of data into one cell, use the concatenat function. This joins up to 30 cells of information. The easy wa...

2 Installation problems with CRM 3
Hi There Im having some trouble installing CRM on at test env. Setup is: 1. AD1 on a win2k server 2. AD2 on a Win2k srv. (with exchange 2000) 3. Crmsrv on a Win2003 srv. (with SQL2005) Im getting an error message when i try to install the Exch. Email router. "Setup cannot connect to the Microsoft CRM server. This might indicate that the server is down. (The request failed with HTTP status 404: Not Found.)" And if i try to install the CRM program on the crm server i get this message : Setup was unable to install Microsoft CRM Server. Setup was unable to Create the Microsoft CRM...

exchange 2003 full acces problem
Hello everybody I create an account on AD and its mailbox. I grant to this mailbox a full access for another account yesterday morning, it wa working, but this morning, i can not open the mailbox, the full acces is still here. Can you explain me what to do. Thank you, Jean-Marc ...

Problem with Outlook sending attachments endlessly
One of my PCs is having a problem sending attachments through Outlook XP. When sending attachments of even moderate size (~750kb), the attachment is sent and then queued again and then sent and then .... Outlook endlessly sends the attachment, flooding my poor recipients. I have tried two completely different SMTP servers with the same result. The odd thing is that my other PC, also with Outlook XP installed, has no problems sending attachments. Any ideas on this one? After queuing an email with an attachment this morning, I came back from lunch and found that it had sent the same email 7...

JB Bates' Runtime Error 1004 problem
I am using Google Groups to view this forum and my three attempts at responding to this post... http://groups.google.com.au/group/microsoft.public.excel.misc/browse_frm/thread/c671c861c59d83d9?hl=en keep on disappearing. I've not had this happen before. I have seen the Pick a Pic code stopped by this error several times before. It usually doesn't happen until after a certain number of pictures that it has to process. Sufferers in the past have been happy with my solution, so here it is again. Don't dimension the oPic object as a Picture, dimension it as a Shape. This ...

xs:all, xs:choice, xs:sequence, none seem to fit
I am beginning to wonder if it is not possible to get this working. I am trying to do: <root> <a/> <b/> <c/> </root> With the following conditions: 1) a,b,c can be in any order 2) a and b can only be used 1 time 3) c can be used 0 to unbounded times. Trying to do this with sequence, choice, all, each seem to miss one part of the requirement. Is this not possible? The simplest way would to use unbounded xs:choice and check that a and b are used only once in your application: <xs:choice minOccurs="1" maxOccurs="unbounded"&g...

CreateDirectory problem
I am trying to create a directory using CreateDirectory(strDirName, NULL); However, when I try to write a file into the created directory I cannot do so, it gives a security error; I do have the Administrator privileges onto the computer and so on. does anyone has any sample code that sorts out the security issue, or just some sample code with respect to the Security Descriptor creation and the rest of the protocol. Try to get the error while you are creating the directory "GetLastError". or try a sample application which would help in getting the cause of Privileges error. ...

Problems with printing
Dear all I have an application, which has been working without problems for the last 7 years. The application has some printing capabilities. Now, we have just gotten a new printer (HP Laserjet CM4370), and when I try to print, my application crashes. The app crashes in the print setup dialog even before I press OK. If I select any other printer as default printer, the app doesn't crash. Then I can show the print setup dialog without problems. But then, when I select the CM4370, the app crashes again, even if I do not press OK. Even if I choose to not show the print setup dialog, and j...

Problem in online transactions
I am still getting the OFXHTTP400 error on T Rowe Price accounts. It gets the pricing information but no additional transactions. I suspect this is a corrupted file. I ran a cleanup and it 18 transactions, none of them TRP but I know the records are intermingled... I have tried this on Money 2004 and Money 2006 on separate computers. Both exhibit the same behavior. I am really starting to get to my wits end - this software is far from the reliable type one needs for perosnal finances. Any ideas how I can fix this? Thanks ...

Logon problem #2
Ok, I have the following situation; A laptop with a domain user, working on a local profile. When connected to the LAN, connecting to exchange is no problem. Outlook is working fine. Now, when disconnected from the LAN, the problem already starts when starting outlook. It will keep looking for the exchange server. Than after an awful lot of time, it will finally time out. I can then normally work in outlook, until I want to exchange between the client and the server. For this I make a PPTP connection to the LAN. This connection works fine, because checked with a simple \\xx.xx.xx.xx ...

Problems with Register DropTarget
Hello, I am trying to debug a new version of a GUI software that contains a Drag/Drop window. In the old verison everything works fine, but now calling Register of my DropTarget member causes an debug assert in olelink.cpp line 82, where m_dwRegister==0 is asserted. Any ideas where to look for?? Thanks, Jens ------------- IDE: VC++6.0 ...

More On Major problems
Hello again. Well the problems have only gotten worse. I keep getting the tcpsvcs.exe failure, now more frequent. I am now getting this "Blue Screen": Memory Managment then same old dialog, at the end STOP 0x0000001A (0x00003452, 0x02B49201, 0xC0505DE4, 0x00000080) Also starting to get failure on spoolsv.exe Do a full memory test on your server using a memtest86 CD (google for it) or equivalent. Verify your hardware is OK - fans, power supplies, UPS, re-seat RAM, etc. STOP errors usually save mini-dump files which can be parsed to try to determine which driver ca...

Draft Folder problem
Hi: I am having two problems in my Drafts folder I am hoping you can make some suggestions. The problem is inside a newgroup of online classes I am taking. Problem 1. Whenever I compose posts many times I need to put it into the Drafts folder more than once. After one or two times trying to save my edits back into the Drafts folder I get the message asking me if I want to save my work, but it doesn't save. The only way I can get the post to disappear is to say no, then the work doesn't save. Problem #2. This just happened for the first time last night. I took a post out of the ...

Save as .gif problem
I'm trying to save a chart to gif format, but the text on the output (gif) file is not as clear (bolder, smaller) as the original chart. Tested on other machines using same platform / application (WinXP / Excel2002) but turns out fine. Are there some options somewhere that I need to change? Hi Ian - How did you save the chart as a gif file? Are you viewing the gif file at its original resolution? Has the file been edited by any image editing program? - Jon ------- Jon Peltier, Microsoft Excel MVP Peltier Technical Services Tutorials and Custom Solutions http://PeltierTech.com/ __...

New Outlook Problem
New problem with Outlook on Office 2000. I am using a legal upgrade of Office 97 &#8211; using Windows 2000 upgrade. I have been using this for some years without problem. Last week, Nov 2003, I suddenly found I could not receive mail from my service provider. I can get a modem lock with the service provider but then receive the following message; OUTLOOK casued an invalid page fault in module PSTPRX32.DLL AT 17F:3FF5AB24. There is a good few more lines of information on this error. The error causes Outlook to crash. I cannot receive or send mail. I can however connec...

DateTime Span
Hello, I am trying to get the span between two dates in seconds, minutes, hours, weeks, months or years. I came up with the following: public static Int64 Span(DateTime begin, DateTime end, TimeInterval interval) { // Check inputs if (begin > end) throw new ArgumentException("Begin date must be previous or equal to end date"); // Define count TimeSpan span = end - begin; switch (interval) { case TimeInterval.Year: return (Int64)(end.Year - begin.Year); case TimeInterval.Month: return (In...

IDCANCEL existance problem
Hi, I have a dialog that has a couple of buttons, of which one is a button with id IDOK and there is no button with id IDCANCEL. When I try to add a button called IDCANCEL I get the message that it already exists. When I created this dialog I probably deleted the IDCANCEL button. When using ClassWizard there is no IDCANCEL control. How can I add an IDCANCEL button? Thanks, Joachim In dialog editor just add button as you would add any new button. then right click on it and go to properties. Choose instead default IDC_BUTTONx to IDCANCEL.... and change caption od button to Cancel or whatever....

Importing problem
We recently installed an exchange server and I am importing my calendar items into the Outlook running on the exchange server from Outlook running on my PC. When I import the calendar items all the appointments are one hour off from the original. I checked the time and time zone on the exchange server and it is the same as the PC. Does anyone know how to fix this? You need to check both time zone and daylight saving time settings in both Windows and Outlook. -- Jocelyn Fiorello MVP - Outlook *** Messages sent to my e-mail address will NOT be answered -- please reply only to the ne...

Creating new contacts from account -problem
I was reading couple of posts but culdnt find any solution. whenever i create new contact from account , i get the error "The parameter is incorrect". I have checked the mapping between account and contact and i dont find anything different . anyone got this to work? regards and thanks Aami The detail error message = The parameter is incorrect. Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. Exception Details: System.Argument...

Problem with some installers
Hello, I am using Win 7 Ultimate x64. Since recently, I am having a problem with some installers (not all). It seems that all installers that cause problems are a) UPX packed b) based on InstallShield When starting the installer, I first get: "Insufficient free disk space" (I have over 3TB free though!) and then: "Cannot prepare main package. Probably incorrect TMP/TEMP variables or there is no execute permission for temporary folder." The variables TMP and TEMP are set correctly and execute permissions are set for the temporary folder. S...

Code problem
The below Auto_Close is suppose to restore the screen display and workbook tabs (toolbars and tabs visible again)when the user closes the window by clicking the "X" button. Auto_Close doesn't work. Can someone help me with the code? I have included the Auto_Open that turns off full screen and tabs, in case it has something to do with why Auto_Close doesn't work. Sub Auto_Open() Dim ws As Worksheet Application.ScreenUpdating = False Application.DisplayFullScreen = True For Each ws In Worksheets If ws.Visible = xlSheetVisible Then w...

Outlook 97 startup problems
Trying to startup outlook 97 I get the following message: The program is not registrated right. Install setup again. Cannot find the file. Check that the path or filename are correct. Does someone have an idea howe I can fix this problem? ...

xs:dateTime and timezone problems
Not sure if this is an xml or a ado.net question: I have created an xml document from a .net dataset which contains a DateTime column, however all the time elements are set to 00:00:00. example of xml created: <Date>2005-06-03T00:00:00.0000000+01:00</Date> I am based in the UK and my computer timezone is set to GMT (although the above data may have been created during DST). If I load this xml document back into a dataset and save the results into a sql table, I find that the time element remains zero (regardless of it being DST or not). If I change my computer timezone to Sydne...

Problem with Outlook Tasks
Hello there, Over the last two weeks I've been having a problem with entering in Tasks in Outlook 2003 SP2. When I try to save a task, I receive the generic error - Please save the task order by clicking save task order on the actions menu in the "tasks" folder. The view must not be filtered or grouped for save taks order to be available. Could not complete the operation. One or more parameter values are not valid. The steps I've taken to resolve this have been Save Task order fails Uninstalling Office 2003 SP1 with a reg clean Exporting all tasks to a PST leaving a c...

xsd.exe (version 1.1) can't deal with <xs:annotation>?
Hi all, in the following situation: <xs:element name="Type"> <xs:simpleType> <xs:restriction base="xs:NMTOKEN"> <xs:enumeration value="I"/> <xs:enumeration value="J"/> <xs:enumeration value="P"> <xs:annotation>P will occur for Primary.</xs:annotation> </xs:enumeration> <xs:enumeration value="S"> <xs:annotation>S will occur for Secondary.</xs:annotation> </xs:enumeration> </xs:restriction> </xs:simpleType> </xs:element> which...