home bbs files messages ]

Forums before death by AOL, social media and spammers... "We can't have nice things"

   comp.databases.ms-sqlserver      Notorious Rube Goldberg contraption      19,505 messages   

[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]

   Message 18,569 of 19,505   
   Erland Sommarskog to costello@iki.fi   
   Re: Datetime with timezone information i   
   02 Mar 12 10:37:12   
   
   From: esquel@sommarskog.se   
      
   Antti Järvinen (costello@iki.fi) writes:   
   > I tried briefly looking through docs but I could not find definite answer:   
   > is there database column datatype that would save date, time and the   
   > timezone as a single value? I have an app that is supposed to run 24/7   
   > and having those daylight saving timezone-changes occurring twice a   
   > year hoses up couple of things twice a year.   
   >   
   > I still have the (good) option of saving time info as seconds since   
   > beginning of year 1970 and having timezone conversions done at client   
   > end but that's not that convenient -> what is the correct way to handle   
   > this around with ms sql server (clients will be .net and asp.net   
   > thingies).   
   > The DATETIMEOFFSET of 2008 version did not look too handy to me,   
   > anything else?   
      
   What's wrong with datetimeoffset? It is not DST-aware in the sense   
   that if you do dateadd(MONTH, 6, sysdatetimeoffset()) you will get a   
   value where the timezone part is +02:00, although you will be in   
   +03:00 at that point. But apart from that it should work.   
      
      
   --   
   Erland Sommarskog, SQL Server MVP, esquel@sommarskog.se   
      
   Links for SQL Server Books Online:   
   SQL 2008: http://msdn.microsoft.com/en-us/sqlserver/cc514207.aspx   
   SQL 2005: http://msdn.microsoft.com/en-us/sqlserver/bb895970.aspx   
      
   --- SoupGate-Win32 v1.05   
    * Origin: you cannot sedate... all the things you hate (1:229/2)   

[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]


(c) 1994,  bbs@darkrealms.ca