bug-gnustep
[Top][All Lists]
Advanced

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

[bug #60952] NSTimeZone fail to deal with tzfile v2+


From: Emmanuel Dreyfus
Subject: [bug #60952] NSTimeZone fail to deal with tzfile v2+
Date: Wed, 11 Aug 2021 21:01:05 -0400 (EDT)
User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.14; rv:60.0) Gecko/20100101 Firefox/60.0

Follow-up Comment #20, bug #60952 (project gnustep):

I modified the test to check behavior for 4 files
- A real v1 file obtained from 13 years old NetBSD 4.0
- A real v2 file obtained from recent NetBSD 9.0
- Your buggy v1 file without magic string
- My buggy v2 file without v2 header

The modified localtime.m and the zone files are attached in localtime.tgz

For all files, I test standard and DST before and after 1996. For v2 files I
also test beyond 2038.

When linking the test with latest libgnustep-base that contains the fixes, all
tests pass, even with the buggy files.

When linking the test with libgnustep-base.so.1.27.0 that does not contains
our fixes, the following tests are failed (I only copy the failed tests for
the sake of clarity): 

2021-08-12 02:53:56.687 localtime[3228:3091415124] Unable to obtain time zone
`./ParisV1-noMagic.tzdb'... <NSException: 0xb82d15e4>
NAME:GSTimeZoneFileException REASON:TZ_MAGIC is incorrect INFO:(null)
Failed test:     localtime.m:20 ... +timeZoneWithName data works
Failed test:     localtime.m:26 ... pre-1996 standard time offset vs UTC found
for user-supplied buggy Europe/Paris TZDB v1 without magic
Failed test:     localtime.m:31 ... pre-1996 DST time offset vs UTC found for
user-supplied buggy Europe/Paris TZDB v1 without magic
Failed test:     localtime.m:37 ... post-1996 standard time offset vs UTC
found for user-supplied buggy Europe/Paris TZDB v1 without magic
Failed test:     localtime.m:42 ... post-1996 DST time offset vs UTC found for
user-supplied buggy Europe/Paris TZDB v1 without magic
Failed test:     localtime.m:49 ... post-2038 DST time offset vs UTC found for
user-supplied buggy Europe/Paris TZDB v2 without v2 header

In summary, the new code fixes post-2038 v2 as we expected, and it also copes
with v1 without magic that caused exception in previous code.

(file #51765)
    _______________________________________________________

Additional Item Attachment:

File name: localtime.tgz                  Size:2 KB
    <https://file.savannah.gnu.org/file/localtime.tgz?file_id=51765>



    _______________________________________________________

Reply to this item at:

  <https://savannah.gnu.org/bugs/?60952>

_______________________________________________
  Message sent via Savannah
  https://savannah.gnu.org/




reply via email to

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