Time Zone

  • tks Steve

  • Nice easy question after a day full of issue, bugs and headaches. Thanks.

  • SQLRNNR (1/9/2012)


    EZ PZ

    +1

    Tom

  • A timely question. We're starting to have to deal with lots of time related data coming in from multiple time zones and need to come up with a good strategy for storing/comparing/managing it all. This data type will likely fill the bill for us, so this question is a good start on my research and design. Thanks!

    Rob Schripsema
    Propack, Inc.

  • cengland0 (1/10/2012)


    mtassin (1/10/2012)


    Oracle supports storing timezone with dates.

    http://docs.oracle.com/cd/B14117_01/server.101/b10759/functions179.htm

    Using the portability defense really isn't a good idea... each DB server is different enough, that queries that can run on all of them, likely run poorly on all of them.

    I cannot disagree with this. However, would you rather write 3 or 4 versions of a program or just one? I sell a service and the companies I sell it to have a variety of server implementations.

    If you are a software writer that has multiple targets, I can see your point. However the vast majority of us, 90+% of the developers out there write for applications that are not sold, are internal, and target one platform.

    Your comment is valid, but you should qualify it with the note that your job requires this. I have almost never seen anyone port code from one RDBMS to another, outside of an ISV. Even when we've switched platforms, it was a data move, not a code move.

    For ISVs, hire more people. Don't write queries that suck on all platforms. Rewrite them for different platforms.

  • cengland0 (1/10/2012)


    mtassin (1/10/2012)


    Oracle supports storing timezone with dates.

    http://docs.oracle.com/cd/B14117_01/server.101/b10759/functions179.htm

    Using the portability defense really isn't a good idea... each DB server is different enough, that queries that can run on all of them, likely run poorly on all of them.

    I cannot disagree with this. However, would you rather write 3 or 4 versions of a program or just one? I sell a service and the companies I sell it to have a variety of server implementations.

    It might be okay to write 3 versions of the same application but then it becomes a problem with enhancements. You need to enhance all of them at the same time and that triples your workload.

    MySQL, Orace, and SQL all support something akin to a stored procedure these days, why write three different apps? Put the SQL in the database. Then you only need an intelligent installation routine that runs the correct database (or tablespace) creation scripts depending on the platform.



    --Mark Tassin
    MCITP - SQL Server DBA
    Proud member of the Anti-RBAR alliance.
    For help with Performance click this link[/url]
    For tips on how to post your problems[/url]

  • Nice easy question, thanks.

    Need an answer? No, you need a question
    My blog at https://sqlkover.com.
    MCSE Business Intelligence - Microsoft Data Platform MVP

  • Nice discussion to follow up with the question.

  • Never heared of timezones 😎

    What you don't know won't hurt you but what you know will make you plan to know better
  • Ok, I'm late...just went through a few old QOD and found this one.

    But I don't really agree with the answer. datetimeoffset doesn't give me timezone information. It just tells me what was the offset at a given date and time. That doesn't tell me what timezone I was in and doesn't even tell me if daylight savings was involved at that moment.

    I just wish we could have real timezone info in SQL Server one day. Would make reporting so much easier instead of having to store in UTC, then loop through all dates on the client side to convert to a specific timezone.

    See this editorial from Steve Jones http://www.sqlservercentral.com/articles/Editorial/92067/[/url]

Viewing 10 posts - 16 through 24 (of 24 total)

You must be logged in to reply to this topic. Login to reply