在oracle的“Oracle® Database Globalization Support Guide”文档中有关timestamp with timezone的描述让我无法理解。Two TIMESTAMP WITH TIME ZONE values are considered identical if they represent the same instant in UTC, regardless of the TIME ZONE offsets stored in the data. For example, the following expressions have the same value:TIMESTAMP '1999-01-15 8:00:00 -8:00'
TIMESTAMP '1999-01-15 11:00:00 -5:00'-----------
TIMESTAMP '1999-01-15 8:00:00 -8:00'
TIMESTAMP '1999-01-15 11:00:00 -5:00'
-----------这两个数据的utc instance时间是多少?
TIMESTAMP '1999-01-15 8:00:00 -8:00'——》utc time"1999-01-15 0:00:00"
TIMESTAMP '1999-01-15 11:00:00 -5:00'——》utc time"1999-01-15 6:00:00"
还是其他?怎么得出“the following expressions have the same value”这个结论的?

解决方案 »

  1.   

    如果是
    TIMESTAMP '1999-01-15 8:00:00 -8:00'——》utc time"1999-01-15 16:00:00" 
    TIMESTAMP '1999-01-15 11:00:00 -5:00'——》utc time"1999-01-15 16:00:00" 的话就是相同的了?应该是如此吧。
      

  2.   

    以英国的格林威治天文台为分界线,以东180度为+xx的时区,以西180度为-xx的时区。'1999-01-15 8:00:00 -8:00'——》utc time"1999-01-15 16:00:00"
    “'1999-01-15 8:00:00”为当地时间。“-8:00”为以西180度为-xx的时区。所以“'1999-01-15 8:00:00 ”-“-8:00”为格林威治时间的“1999-01-15 16:00:00”。
    也就是说utc时间为“1999-01-15 16:00:00”时,“-8.00”时区的时间为“1999-01-15 8:00:00”, “-5:00的”时区的时间为“'1999-01-15 11:00:00'”,如果以utc时间为标准的话,是同一时间。“ The time zone offset is the difference (in hours and minutes) between local time and UTC (Coordinated Universal Time, formerly Greenwich Mean Time)”这段是oracle对time offset的定义。