You are viewing a plain text version of this content. The canonical link for it is here.
Posted to c-dev@axis.apache.org by "Dave Meier (JIRA)" <ji...@apache.org> on 2008/03/10 18:24:46 UTC
[jira] Created: (AXIS2C-1049) Axis2/C does not handle timezone
offsets or fractional seconds correctly
Axis2/C does not handle timezone offsets or fractional seconds correctly
------------------------------------------------------------------------
Key: AXIS2C-1049
URL: https://issues.apache.org/jira/browse/AXIS2C-1049
Project: Axis2-C
Issue Type: Bug
Components: util
Affects Versions: Current (Nightly)
Environment: Windows XP
Reporter: Dave Meier
Priority: Blocker
See section 3.2.7.1 of the spec at http://www.w3.org/TR/xmlschema-2/
I have a C# client sending a date/time string as "2008-03-08T23:30:43.6915406-08:00" which is an acceptable way of describing a time in the US/Pacific timezone. It looks like the code in util/src/date_time.c was recently changed, but even before it was not handling this type of date/time string.
First, it is treating the ".6915406" as milliseconds and giving me an error because it's greater than 999. This is supposed to be fractional seconds, not msec.
Second, it doesn't parse the "-08:00" at all. It is using the following to scan:
sscanf(time_str, "%d:%d:%d.%dZ", &hour, &min, &sec, &msec);
But the spec shows "'-'? yyyy '-' mm '-' dd 'T' hh ':' mm ':' ss ('.' s+)? (zzzzzz)?" where the ".s+" part is the fractional seconds and "zzzzzz" can be "Z" or "+02:00" or "-08:00", etc.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
---------------------------------------------------------------------
To unsubscribe, e-mail: axis-c-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-c-dev-help@ws.apache.org
[jira] Commented: (AXIS2C-1049) Axis2/C does not handle timezone
offsets or fractional seconds correctly
Posted by "Senaka Fernando (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/AXIS2C-1049?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12577469#action_12577469 ]
Senaka Fernando commented on AXIS2C-1049:
-----------------------------------------
Hi Dave,
Fixed all issues, except the conversion of fractional part to milliseconds as you say. This IIRC is not required as of the XML Schema spec.
Regards,
Senaka
> Axis2/C does not handle timezone offsets or fractional seconds correctly
> ------------------------------------------------------------------------
>
> Key: AXIS2C-1049
> URL: https://issues.apache.org/jira/browse/AXIS2C-1049
> Project: Axis2-C
> Issue Type: Bug
> Components: util
> Affects Versions: Current (Nightly)
> Environment: Windows XP
> Reporter: Dave Meier
> Assignee: Senaka Fernando
> Priority: Blocker
> Fix For: Current (Nightly)
>
> Attachments: diff.txt
>
>
> See section 3.2.7.1 of the spec at http://www.w3.org/TR/xmlschema-2/
> I have a C# client sending a date/time string as "2008-03-08T23:30:43.6915406-08:00" which is an acceptable way of describing a time in the US/Pacific timezone. It looks like the code in util/src/date_time.c was recently changed, but even before it was not handling this type of date/time string.
> First, it is treating the ".6915406" as milliseconds and giving me an error because it's greater than 999. This is supposed to be fractional seconds, not msec.
> Second, it doesn't parse the "-08:00" at all. It is using the following to scan:
> sscanf(time_str, "%d:%d:%d.%dZ", &hour, &min, &sec, &msec);
> But the spec shows "'-'? yyyy '-' mm '-' dd 'T' hh ':' mm ':' ss ('.' s+)? (zzzzzz)?" where the ".s+" part is the fractional seconds and "zzzzzz" can be "Z" or "+02:00" or "-08:00", etc.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
---------------------------------------------------------------------
To unsubscribe, e-mail: axis-c-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-c-dev-help@ws.apache.org
[jira] Updated: (AXIS2C-1049) Axis2/C does not handle timezone
offsets or fractional seconds correctly
Posted by "Dave Meier (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/AXIS2C-1049?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Dave Meier updated AXIS2C-1049:
-------------------------------
Attachment: diff.txt
Hi Senaka,
I attached a diff file as date_time.c failed to compile. The diff shows what I changed to make it compile.
Also, I have some other comments:
1. The ".%d" part that comes after the seconds is optional, so you first must check if there is a "." in the string and then parse accordingly. This is fractional seconds, not msec. So it needs to be converted to a value between 0 and 999 msec (e.g. ".6903043" is 690 msec).
2. You could scan for either "+" or "-" by using a %c and scanning it into a character. This would save having two sscanf lines where one handles "+" and one handles "-". I think if you do this you can then have one sscanf for handling ".%d" and one that doesn't have the ".%d". So you would have: "%d-%d-%dT%d:%d:%d.%d%c%d:%d" and "%d-%d-%dT%d:%d:%d%c%d:%d" where the second one has no ".%d".
Thanks,
-Dave.
> Axis2/C does not handle timezone offsets or fractional seconds correctly
> ------------------------------------------------------------------------
>
> Key: AXIS2C-1049
> URL: https://issues.apache.org/jira/browse/AXIS2C-1049
> Project: Axis2-C
> Issue Type: Bug
> Components: util
> Affects Versions: Current (Nightly)
> Environment: Windows XP
> Reporter: Dave Meier
> Assignee: Senaka Fernando
> Priority: Blocker
> Fix For: Current (Nightly)
>
> Attachments: diff.txt
>
>
> See section 3.2.7.1 of the spec at http://www.w3.org/TR/xmlschema-2/
> I have a C# client sending a date/time string as "2008-03-08T23:30:43.6915406-08:00" which is an acceptable way of describing a time in the US/Pacific timezone. It looks like the code in util/src/date_time.c was recently changed, but even before it was not handling this type of date/time string.
> First, it is treating the ".6915406" as milliseconds and giving me an error because it's greater than 999. This is supposed to be fractional seconds, not msec.
> Second, it doesn't parse the "-08:00" at all. It is using the following to scan:
> sscanf(time_str, "%d:%d:%d.%dZ", &hour, &min, &sec, &msec);
> But the spec shows "'-'? yyyy '-' mm '-' dd 'T' hh ':' mm ':' ss ('.' s+)? (zzzzzz)?" where the ".s+" part is the fractional seconds and "zzzzzz" can be "Z" or "+02:00" or "-08:00", etc.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
---------------------------------------------------------------------
To unsubscribe, e-mail: axis-c-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-c-dev-help@ws.apache.org
[jira] Assigned: (AXIS2C-1049) Axis2/C does not handle timezone
offsets or fractional seconds correctly
Posted by "Senaka Fernando (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/AXIS2C-1049?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Senaka Fernando reassigned AXIS2C-1049:
---------------------------------------
Assignee: Senaka Fernando
> Axis2/C does not handle timezone offsets or fractional seconds correctly
> ------------------------------------------------------------------------
>
> Key: AXIS2C-1049
> URL: https://issues.apache.org/jira/browse/AXIS2C-1049
> Project: Axis2-C
> Issue Type: Bug
> Components: util
> Affects Versions: Current (Nightly)
> Environment: Windows XP
> Reporter: Dave Meier
> Assignee: Senaka Fernando
> Priority: Blocker
>
> See section 3.2.7.1 of the spec at http://www.w3.org/TR/xmlschema-2/
> I have a C# client sending a date/time string as "2008-03-08T23:30:43.6915406-08:00" which is an acceptable way of describing a time in the US/Pacific timezone. It looks like the code in util/src/date_time.c was recently changed, but even before it was not handling this type of date/time string.
> First, it is treating the ".6915406" as milliseconds and giving me an error because it's greater than 999. This is supposed to be fractional seconds, not msec.
> Second, it doesn't parse the "-08:00" at all. It is using the following to scan:
> sscanf(time_str, "%d:%d:%d.%dZ", &hour, &min, &sec, &msec);
> But the spec shows "'-'? yyyy '-' mm '-' dd 'T' hh ':' mm ':' ss ('.' s+)? (zzzzzz)?" where the ".s+" part is the fractional seconds and "zzzzzz" can be "Z" or "+02:00" or "-08:00", etc.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
---------------------------------------------------------------------
To unsubscribe, e-mail: axis-c-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-c-dev-help@ws.apache.org
[jira] Commented: (AXIS2C-1049) Axis2/C does not handle timezone
offsets or fractional seconds correctly
Posted by "Dave Meier (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/AXIS2C-1049?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12577127#action_12577127 ]
Dave Meier commented on AXIS2C-1049:
------------------------------------
Hi Senaka,
You can downgrade this from Blocker if you need to as I have hooked up my own datetime parser for now to deserialize the date/time strings.
Thanks,
-Dave.
> Axis2/C does not handle timezone offsets or fractional seconds correctly
> ------------------------------------------------------------------------
>
> Key: AXIS2C-1049
> URL: https://issues.apache.org/jira/browse/AXIS2C-1049
> Project: Axis2-C
> Issue Type: Bug
> Components: util
> Affects Versions: Current (Nightly)
> Environment: Windows XP
> Reporter: Dave Meier
> Assignee: Senaka Fernando
> Priority: Blocker
>
> See section 3.2.7.1 of the spec at http://www.w3.org/TR/xmlschema-2/
> I have a C# client sending a date/time string as "2008-03-08T23:30:43.6915406-08:00" which is an acceptable way of describing a time in the US/Pacific timezone. It looks like the code in util/src/date_time.c was recently changed, but even before it was not handling this type of date/time string.
> First, it is treating the ".6915406" as milliseconds and giving me an error because it's greater than 999. This is supposed to be fractional seconds, not msec.
> Second, it doesn't parse the "-08:00" at all. It is using the following to scan:
> sscanf(time_str, "%d:%d:%d.%dZ", &hour, &min, &sec, &msec);
> But the spec shows "'-'? yyyy '-' mm '-' dd 'T' hh ':' mm ':' ss ('.' s+)? (zzzzzz)?" where the ".s+" part is the fractional seconds and "zzzzzz" can be "Z" or "+02:00" or "-08:00", etc.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
---------------------------------------------------------------------
To unsubscribe, e-mail: axis-c-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-c-dev-help@ws.apache.org
[jira] Resolved: (AXIS2C-1049) Axis2/C does not handle timezone
offsets or fractional seconds correctly
Posted by "Senaka Fernando (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/AXIS2C-1049?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Senaka Fernando resolved AXIS2C-1049.
-------------------------------------
Resolution: Fixed
Fix Version/s: Current (Nightly)
Hi Dave,
I have fixed this issue. Please do check and let me know if there is anything left to be done. Will test this tomorrow to be certain that the latest additions did not introduce any new bugs. :D...
Regards,
Senaka
> Axis2/C does not handle timezone offsets or fractional seconds correctly
> ------------------------------------------------------------------------
>
> Key: AXIS2C-1049
> URL: https://issues.apache.org/jira/browse/AXIS2C-1049
> Project: Axis2-C
> Issue Type: Bug
> Components: util
> Affects Versions: Current (Nightly)
> Environment: Windows XP
> Reporter: Dave Meier
> Assignee: Senaka Fernando
> Priority: Blocker
> Fix For: Current (Nightly)
>
>
> See section 3.2.7.1 of the spec at http://www.w3.org/TR/xmlschema-2/
> I have a C# client sending a date/time string as "2008-03-08T23:30:43.6915406-08:00" which is an acceptable way of describing a time in the US/Pacific timezone. It looks like the code in util/src/date_time.c was recently changed, but even before it was not handling this type of date/time string.
> First, it is treating the ".6915406" as milliseconds and giving me an error because it's greater than 999. This is supposed to be fractional seconds, not msec.
> Second, it doesn't parse the "-08:00" at all. It is using the following to scan:
> sscanf(time_str, "%d:%d:%d.%dZ", &hour, &min, &sec, &msec);
> But the spec shows "'-'? yyyy '-' mm '-' dd 'T' hh ':' mm ':' ss ('.' s+)? (zzzzzz)?" where the ".s+" part is the fractional seconds and "zzzzzz" can be "Z" or "+02:00" or "-08:00", etc.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
---------------------------------------------------------------------
To unsubscribe, e-mail: axis-c-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-c-dev-help@ws.apache.org