G
Guest
We have a webservice that has a method and this method returns a dataset. In
the client we can change values of this dataset and send it back to
webservices which in turn updates a database. Well we discovered a problem
with the datasets (I don’t know if it’s a problem or not actually). It seems
when you have a datetime field in a dataset, it’s value is stored along with
the local time zone info. The problem arises if the webservice and the client
are in different time zones. Let’s say if the web service is in Eastern and
the client is in Central time zone. A value “2/2/2005 00:00:000000-05:00†in
the webservices when sent to the client displayed as “2/1/2005
23:00:000000-06:00â€. Dataset is basically doing a little transformation when
it’s deserializing in the client. This is not desirable for us. We want
everyone to see the value as it’s in the database. So we came up with a
solution. I’m not passing dataset to the client anymore, but I’m xml
serializing the dataset and pass the string to the client. Then in the client
before I desearialize the dataset, I stript out the timezone information.
After the deserialization, we see that the process slugs in local time zone
information in the datetime field values and now we see “2/2/2005
00:00:000000-06:00†as our value. This is our ideal solution. But we want to
optimize the process of striping time zone info out of serialized dataset. We
can traverse it using xml dom, but I think we can also use XSLT as well. So
how can do this transformation with using XSLT.
the client we can change values of this dataset and send it back to
webservices which in turn updates a database. Well we discovered a problem
with the datasets (I don’t know if it’s a problem or not actually). It seems
when you have a datetime field in a dataset, it’s value is stored along with
the local time zone info. The problem arises if the webservice and the client
are in different time zones. Let’s say if the web service is in Eastern and
the client is in Central time zone. A value “2/2/2005 00:00:000000-05:00†in
the webservices when sent to the client displayed as “2/1/2005
23:00:000000-06:00â€. Dataset is basically doing a little transformation when
it’s deserializing in the client. This is not desirable for us. We want
everyone to see the value as it’s in the database. So we came up with a
solution. I’m not passing dataset to the client anymore, but I’m xml
serializing the dataset and pass the string to the client. Then in the client
before I desearialize the dataset, I stript out the timezone information.
After the deserialization, we see that the process slugs in local time zone
information in the datetime field values and now we see “2/2/2005
00:00:000000-06:00†as our value. This is our ideal solution. But we want to
optimize the process of striping time zone info out of serialized dataset. We
can traverse it using xml dom, but I think we can also use XSLT as well. So
how can do this transformation with using XSLT.