xml架构时区 [英] xml schema Timezone
问题描述
我收到了一些xml数据,其中包括以xml模式标准dateTime格式在应用程序本地时间的午夜拍摄的时间戳(请参阅 http://www.w3.org/TR/xmlschema-2/#dateTime 供参考)。
I received some xml data that includes a timestamp taken at midnight of the application's local time in the xml schema standard dateTime format (see http://www.w3.org/TR/xmlschema-2/#dateTime for reference).
时间戳记为:2012-02-04T13:00:00Z
The timestamp is: 2012-02-04T13:00:00Z
根据我已经找到的信息,相关时区为'(GMT + 13:00 )Nukualofa,对应于位置太平洋/汤加塔普。我们只应该接收带有与适用于美国48个州的时区/位置相对应的时间戳的数据,因此,对于哪个时区/位置与该时间戳相对应,我感到困惑。
Based on information I've been able to find, the relevant timezone is '(GMT+13:00) Nukualofa' which corresponds to the location 'Pacific/Tongatapu'. We are only supposed to be receiving data with timestamps that correspond to timezones/locations applicable to the contiguous 48 US states, so I am bewildered as to what timezone/location corresponds to the timestamp.
我的问题是,基于2012-02-04T13:00:00Z的dateTime,它对应什么UTC时区,在地球上的位置等?
My question is, based on a dateTime of 2012-02-04T13:00:00Z, what UTC timezone, location on earth, etc. does it correspond?
推荐答案
我认为您的解释可能已经过时;我看不到您是如何从13:00:00Z以GMT + 13:00结束的。
I think that your interpretation might be off; I can't see how you ended up with GMT+13:00 from 13:00:00Z.
XSD规范给出了以下示例:
The XSD spec gives the following example:
2002-10-10T12:00:00+05:00 is 2002-10-10T07:00:00Z
2002-10-10T00:00:00+05:00 is 2002-10-09T19:00:00Z
非负数持续时间是指时区在前面;否定的后面。
A nonnegative duration means that the time zone is ahead; negative is behind.
假设时间戳记是在午夜(12:00 AM)拍摄的,并且它与13:00:00Z相匹配,那么您可以在前面或后面将其抵消后面:
Assuming that the timestamp was taken at midnight (12:00AM), and it matched 13:00:00Z, then you could offset this either ahead or behind:
Behind: 2012-02-04T00:00:00-13:00 is 2012-02-04T13:00:00Z
Ahead: 2012-02-05T00:00:00+11:00 is 2012-02-04T13:00:00Z
唯一有效的是前面(没有-13);关于该时区的时间,请此处。
The only one valid is the ahead (there is no -13); As to what is in that time zone, take a look here.
这篇关于xml架构时区的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!