in Education by
Some 4 years back, I followed this MSDN article for DateTime usage best practices for building a .Net client on .Net 1.1 and ASMX web services (with SQL 2000 server as the backend). I still remember the serialization issues I had with DateTime and the testing effort it took for servers in different time zones. My questions is this: Is there a similar best practices document for some of the new technologies like WCF and SQL server 2008, especially with the addition of new datetime types for storing time zone aware info. This is the environment: SQL server 2008 on Pacific Time. Web Services layer on a different time zone. Clients could be using .Net 2.0 or .Net 3.5 on different time zones. If it makes it easy, we can force everyone to upgrade to .Net 3.5. :) Any good suggestions/best practices for the data types to be used in each layer? JavaScript questions and answers, JavaScript questions pdf, JavaScript question bank, JavaScript questions and answers pdf, mcq on JavaScript pdf, JavaScript questions and solutions, JavaScript mcq Test , Interview JavaScript questions, JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)

1 Answer

0 votes
by
I think the best way of doing this is to always pass the object as UTC, and convert to local time on the clients. By doing so, there is a common reference point for all clients. To convert to UTC, call ToUniversalTime on the DateTime object. Then, on the clients, call ToLocalTime to get it in their current time zone.

Related questions

0 votes
    Some 4 years back, I followed this MSDN article for DateTime usage best practices for building a .Net ... Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Mar 24, 2022 in Education by JackTerrance
0 votes
    I've worked a lot with Pentaho PDI so some obvious things jump out at me. I'll call Connection ... JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked May 14, 2022 in Education by JackTerrance
0 votes
    Mention a few design and development best practices for Informatica....
asked Mar 27, 2021 in Technology by JackTerrance
0 votes
    What Are The Best Practices For Amazon Ec2 ?...
asked Mar 12, 2021 in Technology by JackTerrance
0 votes
    What Are The Security Best Practices For Amazon Ec2 ?...
asked Mar 12, 2021 in Technology by JackTerrance
0 votes
    What are the best practices for caching in RESTful?...
asked Nov 7, 2020 in Technology by JackTerrance
0 votes
    What are the best practices to create a standard URI for a web service?...
asked Nov 7, 2020 in Technology by JackTerrance
0 votes
    Traditionalist argue that stored procedures provide better security than if you use a Object Relational Mapping (ORM) ... for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Mar 16, 2022 in Education by JackTerrance
0 votes
    This is a bit of an odd question, but it has been bothering me for a few months now. I have ... , JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Feb 19, 2022 in Education by JackTerrance
0 votes
    What are some of the best practices in test automation?...
asked Jul 10, 2021 in Technology by JackTerrance
0 votes
    What are some best practices you should follow while using ServiceNow?...
asked May 25, 2021 in Technology by JackTerrance
0 votes
    What are the best practices to be followed while designing a secure RESTful web service?...
asked Nov 7, 2020 in Technology by JackTerrance
0 votes
    What are the best practices to design a resource representation?...
asked Nov 7, 2020 in Technology by JackTerrance
+1 vote
    Enlist some best practices that are followed to make API testing successful?...
asked Oct 15, 2020 in Technology by JackTerrance
0 votes
    What are 3 practices of Extreme programming...
asked Nov 30, 2020 in Technology by Editorial Staff
...