Author |
Message
|
mb01mqbrkrs |
Posted: Thu Feb 07, 2013 1:12 am Post subject: Unrecognised Timezone |
|
|
Apprentice
Joined: 18 Nov 2011 Posts: 48
|
Getting an odd issue when trying to deal with a datetime field that Broker itself is producing!
The flow is reading a monitoring event message generated by other flows. I'm try to convert the datetime field into a timestamp for inserting into a DB. A example value for this field is below..
Code: |
<wmb:eventSequence wmb:creationTime="2013-02-07T08:27:37.419Z" wmb:counter="1"/> |
Looking at the documentation, this looks like a standard 'IU' format. But when i try to perform the cast, it returns...
Code: |
<CastException>
<File>/build/slot1/S800_P/src/CommonServices/ImbDateTime.cpp</File>
<Line>3962</Line>
<Function>ImbTimeZone::ImbTimeZone</Function>
<Type/>
<Name/>
<Label/>
<Catalog>BIPmsgs</Catalog>
<Severity>3</Severity>
<Number>2319</Number>
<Text>unrecognised timezone</Text>
<Insert>
<Type>2</Type>
<Text>-1</Text>
</Insert>
<Insert>
<Type>5</Type>
<Text>S22007</Text>
</Insert>
<Insert>
<Type>5</Type>
<Text>GMT02213</Text>
</Insert>
</CastException> |
Any ideas experts? I can't find a reference to the "unrecognised timezone" error anywhere (google, infocenter, this board).
WMB 8.0.0.1 |
|
Back to top |
|
 |
mqjeff |
Posted: Thu Feb 07, 2013 2:27 am Post subject: |
|
|
Grand Master
Joined: 25 Jun 2008 Posts: 17447
|
Neither of those inserts appear to apply to the timestamp you posted. |
|
Back to top |
|
 |
rekarm01 |
Posted: Thu Feb 07, 2013 2:43 am Post subject: Re: Unrecognised Timezone |
|
|
Grand Master
Joined: 25 Jun 2008 Posts: 1415
|
mb01mqbrkrs wrote: |
But when i try to perform the cast ... |
What does the CAST look like? Post the relevant code. |
|
Back to top |
|
 |
mb01mqbrkrs |
Posted: Thu Feb 07, 2013 3:04 am Post subject: |
|
|
Apprentice
Joined: 18 Nov 2011 Posts: 48
|
OK - new example...
Code: |
<wmb:eventSequence wmb:creationTime="2013-02-07T10:58:46.759065Z" wmb:counter="2"/>
|
Cast error...
Code: |
<RecoverableException>
<File>/build/slot1/S800_P/src/DataFlowEngine/ImbRdl/ImbRdlTypeCast.cpp</File>
<Line>268</Line>
<Function>SqlTypeCast::evaluate</Function>
<Type/>
<Name/>
<Label/>
<Catalog>BIPmsgs</Catalog>
<Severity>3</Severity>
<Number>2521</Number>
<Text>Error while casting</Text>
<Insert>
<Type>5</Type>
<Text>.EventToAudit_Map.Main</Text>
</Insert>
<Insert>
<Type>5</Type>
<Text>12.31</Text>
</Insert>
<Insert>
<Type>5</Type>
<Text>'2013-02-07T10:58:46.759065Z'</Text>
</Insert>
<Insert>
<Type>5</Type>
<Text>TIMESTAMP</Text>
</Insert>
<CastException>
<File>/build/slot1/S800_P/src/CommonServices/ImbDateTime.cpp</File>
<Line>3962</Line>
<Function>ImbTimeZone::ImbTimeZone</Function>
<Type/>
<Name/>
<Label/>
<Catalog>BIPmsgs</Catalog>
<Severity>3</Severity>
<Number>2319</Number>
<Text>unrecognised timezone</Text>
<Insert>
<Type>2</Type>
<Text>-1</Text>
</Insert>
<Insert>
<Type>5</Type>
<Text>S22007</Text>
</Insert>
<Insert>
<Type>5</Type>
<Text>GMT75906</Text>
</Insert>
</CastException>
</RecoverableException>
|
Cast Code...
Code: |
DECLARE eventTime TIMESTAMP CAST(eventData.event:eventSequence.(XMLNSC.Attribute)event:creationTime AS TIMESTAMP FORMAT 'IU');
|
Thanks for responding! |
|
Back to top |
|
 |
mqjeff |
Posted: Thu Feb 07, 2013 3:29 am Post subject: |
|
|
Grand Master
Joined: 25 Jun 2008 Posts: 17447
|
Code: |
<Text>'2013-02-07T10:58:46.759065Z'</Text> |
I'm suspicious of the apostrophes. |
|
Back to top |
|
 |
rekarm01 |
Posted: Thu Feb 07, 2013 4:21 am Post subject: |
|
|
Grand Master
Joined: 25 Jun 2008 Posts: 1415
|
mb01mqbrkrs wrote: |
OK - new example...
Code: |
<wmb:eventSequence wmb:creationTime="2013-02-07T10:58:46.759065Z" wmb:counter="2"/> |
...
Code: |
DECLARE eventTime TIMESTAMP CAST(eventData.event:eventSequence.(XMLNSC.Attribute)event:creationTime AS TIMESTAMP FORMAT 'IU'); |
|
Does the 'IU' format allow more than three digits for fractional seconds? |
|
Back to top |
|
 |
mb01mqbrkrs |
Posted: Thu Feb 07, 2013 7:41 am Post subject: |
|
|
Apprentice
Joined: 18 Nov 2011 Posts: 48
|
rekarm01 wrote: |
Does the 'IU' format allow more than three digits for fractional seconds? |
100% correct! Taking out the remaining digits works correctly. Shame that the events generated by the Broker can't be a standard format really.
Thanks rekarm01 and jeff for your help.  |
|
Back to top |
|
 |
rekarm01 |
Posted: Fri Feb 08, 2013 1:20 am Post subject: |
|
|
Grand Master
Joined: 25 Jun 2008 Posts: 1415
|
mb01mqbrkrs wrote: |
Taking out the remaining digits works correctly. |
Or modifying the FORMAT clause would also work.
mb01mqbrkrs wrote: |
Shame that the events generated by the Broker can't be a standard format really. |
The ISO 8601 standard describes a large number of date/time formats. w3c defines a much smaller subset of supported ISO 8601 formats. But neither document imposes a requirement on the number of digits in the fractional portion of a second. There are many standard date/time formats, to suit different purposes, but 'IU' can only express one of them. |
|
Back to top |
|
 |
|