P
Pieter Coucke
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) -> XML -> DataSet -> SQL Server
When I run everything in the West Central Africa Timezone (GMT+1, no
summer-time): everything works fine. But I notice that all my dates in my
XML-file are written like this
"<DATE_DEB_APP>2006-02-01T00:00:00.0000000+01:00</DATE_DEB_APP> ": with the
"+01:00" at the end. But not that big of a problem, because the application
writes the date with 00:00 hours to the database.
I (well, my pc) is in the Brussels Timezone (GMT+1: but because of the
summer-hour we actuallt have GTM+2 now).
Everything goes fine also when I put the databse on my local SQL Server,
make the XML-file, read it again, and write it to the other database (also
local). All the dates are also presented with the "+01:00"-suffix. Except
one: a date that the application writes to the database when filling the
DataSet, and select it at the end to put it in the XML-file also: this one
gets the suffix "+02:00":
<SyncSend>2006-05-03T09:58:19.6070000+02:00</SyncSend>
So far so good: some not-really wanted things, but everything goes fine.
Problems start when I'm doing a synchronisation between an SQL server in
Central African TimeZone, and a local one in Brussels Timezone.
What hapens is that all my dates are having 1 hour added to them! So instead
of the "2006-02-01T00:00:00" they have as value "2006-02-01T01:00:00"!!
I somehow can understand why this happens; because 00:00h in Central Africa
is 01:00h in Brussels on this moment. But I don't want it to happen! I want
the exact time to be transfered!
Does anybody has a clue where this exactly happens? And how to prevent this?
Is there a way to say that it has to use the actual value? and not one that
calculates the time?
On this moment it's really nice to be able to use tha capbilities of the
DataSet with the XML-files and SqlDataAdapter with commandbuilder to do my
insert and updates. I won't really like to loose this :-S
Thanks a lot in advance!
Any help our hints would be really appreciated!
Pieter
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) -> XML -> DataSet -> SQL Server
When I run everything in the West Central Africa Timezone (GMT+1, no
summer-time): everything works fine. But I notice that all my dates in my
XML-file are written like this
"<DATE_DEB_APP>2006-02-01T00:00:00.0000000+01:00</DATE_DEB_APP> ": with the
"+01:00" at the end. But not that big of a problem, because the application
writes the date with 00:00 hours to the database.
I (well, my pc) is in the Brussels Timezone (GMT+1: but because of the
summer-hour we actuallt have GTM+2 now).
Everything goes fine also when I put the databse on my local SQL Server,
make the XML-file, read it again, and write it to the other database (also
local). All the dates are also presented with the "+01:00"-suffix. Except
one: a date that the application writes to the database when filling the
DataSet, and select it at the end to put it in the XML-file also: this one
gets the suffix "+02:00":
<SyncSend>2006-05-03T09:58:19.6070000+02:00</SyncSend>
So far so good: some not-really wanted things, but everything goes fine.
Problems start when I'm doing a synchronisation between an SQL server in
Central African TimeZone, and a local one in Brussels Timezone.
What hapens is that all my dates are having 1 hour added to them! So instead
of the "2006-02-01T00:00:00" they have as value "2006-02-01T01:00:00"!!
I somehow can understand why this happens; because 00:00h in Central Africa
is 01:00h in Brussels on this moment. But I don't want it to happen! I want
the exact time to be transfered!
Does anybody has a clue where this exactly happens? And how to prevent this?
Is there a way to say that it has to use the actual value? and not one that
calculates the time?
On this moment it's really nice to be able to use tha capbilities of the
DataSet with the XML-files and SqlDataAdapter with commandbuilder to do my
insert and updates. I won't really like to loose this :-S
Thanks a lot in advance!
Any help our hints would be really appreciated!
Pieter