Bug 17285 - [QT3TS] format-time-015
Summary: [QT3TS] format-time-015
Status: CLOSED FIXED
Alias: None
Product: XPath / XQuery / XSLT
Classification: Unclassified
Component: XQuery 3 & XPath 3 Test Suite (show other bugs)
Version: Working drafts
Hardware: PC Windows NT
: P2 normal
Target Milestone: ---
Assignee: Michael Kay
QA Contact: Mailing list for public feedback on specs from XSL and XML Query WGs
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-06-01 15:57 UTC by Tim Mills
Modified: 2012-10-10 10:03 UTC (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Tim Mills 2012-06-01 15:57:30 UTC
I'm failing to match the expected result of this (and some other) date/time format tests.

When formatting time zones with [z], the expect result includes results such as

0715GMT-14; 
0745GMT-13:30; 
0915;

whereas I produce

0715GMT-14:00; 
0745GMT-13:30; 
0915GMT;

respectively.

Since there is no presentation modifier for [z], the default must be used "01:01".

I presume that this means that the hour component of the timezone is presented using "01", and that the minute component is presented with "01".  That said, from the spec

"If this substring contains a single character, this is interpreted as the first presentation modifier. If it contains more than one character, the last character is examined: if it is valid as a second presentation modifier then it is treated as such, and the preceding part of the substring constitutes the first presentation modifier. Otherwise, the second presentation modifier is presumed absent and the whole substring is interpreted as the first presentation modifier."

suggests that the presentation modifier should be split as "01:0" and "1".
Comment 1 Michael Kay 2012-06-01 16:06:38 UTC
Yes, some of these tests have not been updated to reflect the changes that were made to the rules for timezone formatting. I will do this, but perhaps not instantly.
Comment 2 Tim Mills 2012-06-01 16:13:38 UTC
Thanks.
Comment 3 O'Neil Delpratt 2012-08-08 15:30:12 UTC
I have made the change required and committed it to cvs.
Comment 4 Tim Mills 2012-08-10 12:00:13 UTC
I get different results for the following tests.

format-date-025
format-dateTime-017
format-dateTime-018

The difference is in the formatting of timezones where the hours component could be represented with a single digit.  
e.g. 0245GMT-06:30; vs. 0245GMT-6:30;
   

format-date-026	  

The difference is in the in the formatting of timezones with a non-zero minute component.
e.g. -13:30 vs. -1330


format-time-016	
format-time-017	 
format-time-018

The difference is in the in the formatting of timezones.
e.g. 14:00 vs. 14-00
Comment 5 O'Neil Delpratt 2012-10-08 15:30:02 UTC
(In reply to comment #4)
> I get different results for the following tests.
> format-date-025
> format-dateTime-017
> format-dateTime-018
> format-date-026    
I agree. We are also getting different results. Made the change and committed to cvs  

> format-time-016    
> format-time-017     
> format-time-018
> The difference is in the in the formatting of timezones.
> e.g. 14:00 vs. 14-00

Don't agree here. We are getting the same result as the expected results. i.e. 14:00 format.
Comment 6 O'Neil Delpratt 2012-10-10 09:23:36 UTC
 
> > format-time-016    
> > format-time-017     
> > format-time-018
> > The difference is in the in the formatting of timezones.
> > e.g. 14:00 vs. 14-00
> 
> Don't agree here. We are getting the same result as the expected results.
> i.e. 14:00 format.

I am wrong here. The format of the test outcomes are different to the expected results. I have made the change to the expected results and committed them to cvs.
Comment 7 Tim Mills 2012-10-10 10:03:35 UTC
Confirmed fixed.  Thanks.