pdf-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [pdf-devel] pdf_time_from_string_pdf


From: jemarch
Subject: Re: [pdf-devel] pdf_time_from_string_pdf
Date: Thu, 23 Jul 2009 22:28:57 +0200
User-agent: Wanderlust/2.14.0 (Africa) SEMI/1.14.6 (Maruoka) FLIM/1.14.8 (Shijō) APEL/10.6 Emacs/23.0.60 (i686-pc-linux-gnu) MULE/6.0 (HANACHIRUSATO)


      I also don't see anything about optional apostrophe in ISO32000,
      however on page 374 there is example where is trailing apostrophe.
      Maybe it is just a mistake in specification, whereas in every
      PDF1.* (where not?) documents trailing ' is necessary.

   I contacted the ISO/TC 171 SC2 asking for a clarification on this
   issue. 

Since I did not have any feedback from the TC 171 SC2, I went ahead
and, assuming that the examples in ISO 32000 using trailing
apostrophes in date strings are wrong (and that the description of the
format from the same document is ok), I implemented the support for
the 'require_trailing_apostrophe' and 'include_trailing_apostrophe'
parameters in 'pdf_time_from_string' and 'pdf_time_to_string'.

After the expansion the unit tests revealed a bug in
'pdf_time_from_string_pdf' that was always setting a gmt offset of 0.
I fixed that bug.

Now a failure remains, and I think that it is related to some buggy
data in the arrays defined in
torture/unit/base/time/pdf-time-testdata.c

The failure is:

base/time/pdf-time-from-string.c:465:F:pdf_time_from_string:pdf_time_from_string_006:0:
Assertion 'pdf_time_cmp(time1, time2) == 0' failed

The error is triggered in the 'pdf_time_from_string_006' test when
applying the first GMT offset (-12 minutes) to the second date defined
in the dates[] array:

DATESTRING: D:19700101000001-12'00'
TIME1: D:19700101120002Z
TIME2: D:19700101000001-12'00'

Lukasz, could you please take a look? The fixes are all in the trunk
now.

-- 
Jose E. Marchesi  <address@hidden>
                  http://www.jemarch.net
GNU Project       http://www.gnu.org




reply via email to

[Prev in Thread] Current Thread [Next in Thread]