[pdf4st] AW: SUnit test timezones

  • From: "Christian Haider" <Christian.Haider@xxxxxxxxxxxxxxxxxxxxxxx>
  • To: <pdf4st@xxxxxxxxxxxxx>
  • Date: Wed, 23 May 2012 19:59:12 +0200

Thanks for this find!

 

Indeed, Dates are written as local timestamp with explicit time zone
offset. The specification does not prescribe that, but I think that
having this information is valuable.

 

Unfortunately, this means that the PDF representation of Dates cannot be
tested in a time zone independent way L.

Therefore, I removed this from the tests.

 

Christian

 

Von: pdf4st-bounce@xxxxxxxxxxxxx [mailto:pdf4st-bounce@xxxxxxxxxxxxx] Im
Auftrag von bobn@xxxxxxxxxx
Gesendet: Sonntag, 20. Mai 2012 10:31
An: pdf4st@xxxxxxxxxxxxx
Betreff: [pdf4st] SUnit test timezones

 

The SUnit test SimpleObjectTests>>testDate has a timezone dependency,
such that...

    self assert: (File readTesterOn: '(D:199812231952-08''00)')
readObject content = (Timestamp d: 24 m: 12 y: 1998 h: 4 m: 52).

...fails. The test would work in GMT+1 but fails in GMT-4.

 

(File readTesterOn: '(D:199812231952-08''00)') readObject content =
December 23, 1998 10:52:00 PM

(Timestamp d: 24 m: 12 y: 1998 h: 4 m: 52) = December 24, 1998 4:52:00
AM

 

(Timestamp d: 24 m: 12 y: 1998 h: 4 m: 52) asPDF pdfSource 

=   '(D:19981224045200--5')'

vs. '(D:19981224045200+01'')'

 

Same problem for TrailerTests>>testCreationDate. 

 

I'm running the tests while renaming PDF4Smalltalk classes with a PDF4
prefix. 

These are the only two tests that fail, but in an understood way. I'll
skip them for now.

 

Bob

Other related posts:

  • » [pdf4st] AW: SUnit test timezones - Christian Haider