GithubHelp home page GithubHelp logo

Comments (2)

GoogleCodeExporter avatar GoogleCodeExporter commented on August 18, 2024
I pulled in that change, but the date thing worries me. 

If we are munging dates coming in from the DB, do we need to munge dates passed 
in as params? 

Are we encouraging bad practices, with a disconnect between the DB and the apps 
dates?

Original comment by [email protected] on 26 Apr 2011 at 1:30

  • Changed state: Fixed

from dapper-dot-net.

GoogleCodeExporter avatar GoogleCodeExporter commented on August 18, 2024
I'm working on a project where all the dates in the database are UTC - however 
they are all stored as SQL Server datetimes, so the DB doesn't actually know 
this.  Thus when the dates are pulled into .NET DateTime objects, the Kind 
property is Unspecified.  This is a problem for me because ToLocal() and 
ToUniversal() don't work reliably on unspecified DateTimes (for example, 
ToUniversal() assumes the date is in local time).

> If we are munging dates coming in from the DB, do we need to munge dates 
passed in as params?

No, this issue occurs because .NET DateTimes have a timezone component and SQL 
Server datetimes don't.  The same problem doesn't occur in reverse.

> Are we encouraging bad practices, with a disconnect between the DB and the 
apps dates?

The dates remain the same, this just affects how the dates are interpreted.

Original comment by [email protected] on 26 Apr 2011 at 8:41

from dapper-dot-net.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.