Distributed model date time strategy

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance



I recently posted this message to
microsoft.public.dotnet.framework.aspnet.webservices, but received no
response, so I'm trying here in this group. I could really use some
feedback.

I'm working on a commercial application that will have data, web
service, and client application tiers. I have no control over where any
of these systems might be deployed, and it's fairly likely that users
running the client application will be in different time zones than the
web service and database server.

What I'd like to do is always store date/time values in the database in
UTC (GMT) format, and then convert them to local date/time values on
the client side. This should minimize the need to be concerned about
time zones in general.

I believe what's required here is that DateTime objects in .NET code
use the ToUniversalTime() function prior to be stored in the database
(a SQL Server in this case). Then I would always call ToLocalTime()
when I display any of these values in the client application. The
client will *always* go through an ASP.NET (ASMX) web service tier to
read/write any data (including date/time values).

Does this seem logical? Any gotchas that I'm overlooking? Just as an
aside, I'm using .NET 2.0 through all layers.

I'd very much appreciate any input, and thanks.

- Mark

.



Relevant Pages

  • Re: WebServices and Datasets
    ... And if I call the GetChanges Method on the dataset that only the ... be shown in the dataset and to pass that to the web service, ... "Now to make sure the remote database is updated with changes should I ... client a change as occurred unless the client is constantly polling it. ...
    (microsoft.public.dotnet.framework.aspnet.webservices)
  • Re: WebServices and Datasets
    ... > be shown in the dataset and to pass that to the web service, ... > well ther GetChanges method creates a new dataset object with only rows ... > "Now to make sure the remote database is updated with changes should I ... > client a change as occurred unless the client is constantly polling it. ...
    (microsoft.public.dotnet.framework.aspnet.webservices)
  • Re: I need an advice...
    ... there are a few people working on it and it has to run in intranet. ... just need to store some data in a database which is on a server and they ... need to access this database from some other computers, with client ... Web service? ...
    (microsoft.public.dotnet.framework.adonet)
  • Re: Distributed model date time strategy
    ... service, and client application tiers. ... users running the client application will be in different time zones ... What I'd like to do is always store date/time values in the database ...
    (microsoft.public.dotnet.framework.webservices)
  • Re: When To Use .NET Remoting?
    ... I'm now going to learn .NET Remoting and have a plan to modify my ... Database directly. ... retrieving/formatting of data from the database in the client itself. ... if you create a Web Service that offers functions such as 'int ...
    (microsoft.public.dotnet.distributed_apps)