Moving to a time zone offset

  • Comments posted to this topic are about the item Moving to a time zone offset

  • Interesting question - i think this will come in handy as our business expands across time zomes

    Space, the final frontier? not any more...
    All limits henceforth are self-imposed.
    “libera tute vulgaris ex”

  • Very good question, wasn't confident in the answer but learned something in the process. Thanks Steve.


  • I thought this was interesting as well. I learned something researching.

  • Good question on TODATETIMEOFFSET (but I prefer to write, for example, "330" instead of "'+05:30'"). 

    I tend to wonder about "ensure all my time values are consistent and comparable".  Will using datetimeoffset achieve that when the local time difference between two places will change somewhere between never and four times a year?  For example Wellingon NZ was 12 hours ahead of London UK until a few weeks ago, then on 29 Sept it became 13 hours,  and on 29 Oct it will become 14 hours, and then on 25 March next year it will become 13 hours again until 1st April when it reverts 12 hours.  This is because most local times change their time zone (and hence their time zone offset) twice every year, and the time at which this happens is not co-ordinanted between different localities. Also, just knowing the country is not enough to determine which standard time zone and which adjusted time zones are used (and when the are adopted/dropped) - it's rather obvious for very big countries with a large east-west spread like the USA and Russia multiple zones are needed, but it also applies to smaller countries like Spain ( Las Palmas uses WET and WEST - same as London and Lisbon - while Madrid uses CET and CEST - imposed by Franco to fit with Berlin) and  New Zealand (Port Hutt uses time zones 45 minutes ahead of Wellington).

    It seems to me that to achieve the stated objectives the code which logs things and their times has to know, every time it logs something, what its local time zone offset for that something at the time it happened so that it can apply the appropriate offset, and  is getting that parameter value is a bit more work that just calling TODATETIMEOFFSET.


  • Hi Tom , as a New Zealander I never knew that the Chatham Islands had a different time zome. Oh the arrogance.
    I've just  started using Temporal Tables and can see how  using UTC  Date-Times in the Database makes sense even though it requires re-educating some of the Analysts.

Viewing 6 posts - 1 through 5 (of 5 total)

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