Posted: Fri Jan 27, 2006 3:35 am Post subject: xsd: DateTime
Voyager
Joined: 05 May 2003 Posts: 98
Platform: XP, WBIMB 5 CSD 4
I maybe missing something here...
I have a target xsd field (OrderDate) of type DateTime with a format of yyyy-MM-dd'T'HH:mm:ssZZZ (ie UTC format)
I have a simple flow that sets this field as follows:
Code:
declare testDate DATE;
set testDate = '2006-01-07';
set OutputRoot.MRM.Header.HeaderDate.OrderDate = testDate;
This results in a field with the value:
2006-01-07T00:00:00+11:00 (I am in Melbourne on DST)
I therefore assume that if no time portion is provided the broker defaults the value to midnight UTC with an 11 hour offset.
However, if I actually set a time as follows:
Code:
declare testDate2 TIMESTAMP;
set testDate2 = '2006-01-07 00:00:00';
set OutputRoot.MRM.Header.HeaderDate.OrderDate = testDate2;
I get the value:
2006-01-07T00:00:00-11:00 (minus 11 hours)
If any time portion is provided, the UTC time portion stays the same with a standard offset of -11:00 hours.
So my question is: in a UTC format does the time represent UTC with the offset applied to get local time OR does the time represent local time with the offset applied to get UTC?
But my time zone is 11 hours ahead of GMT not 11 hours behind!
I was expecting a local time to be represented as <localtime>+11:00 hours but in fact it comes out as <localtime>-11:00.
By not providing the time part it will assume midnight from the epoch - but is that 00:00:00 local time or 00:00:00 GMT?
My test looks as if it is midnight localtime and therefore converts it to 00:00:00+11:00 correctly. For conversions where a time is actually provided it appears to be just wrong!
IBM have told me there is a known bug with the broker handling UTC times that causes the error described. Apparantly it is fixed in the forthcoming CSD 7. It only manifests itself to those folks in timezones ahead of GMT.
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum