bug-gnustep
[Top][All Lists]
Advanced

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

[bug #52011] Remove incorrect init from NSDateFormatter, and fix call to


From: David Lobron
Subject: [bug #52011] Remove incorrect init from NSDateFormatter, and fix call to udat_open
Date: Wed, 13 Sep 2017 12:54:49 -0400 (EDT)
User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/60.0.3112.113 Safari/537.36

URL:
  <http://savannah.gnu.org/bugs/?52011>

                 Summary: Remove incorrect init from NSDateFormatter, and fix
call to udat_open
                 Project: GNUstep
            Submitted by: dlobron
            Submitted on: Wed 13 Sep 2017 04:54:48 PM UTC
                Category: Base/Foundation
                Severity: 3 - Normal
              Item Group: Bug
                  Status: None
                 Privacy: Public
             Assigned to: None
             Open/Closed: Open
         Discussion Lock: Any

    _______________________________________________________

Details:

In NSDateFormatter.m, the [NSDateFormatter init] method has code that is
called when GS_USE_ICU is enabled.  When run on GNU/Linux (Ubuntu
3.13.0-113-generic), I found that it causes NSDateFormatter to have an invalid
initial dateFormat.  On an Apple system, the initial dateFormat is nil, and
that seems correct for Linux also.  I propose removing this code, which is at
NSDateFormatter.m:113-148 in my source.

Also, the call to udat_open should pass UDAT_PATTERN for the first two
arguments, if the pattern argument is unused.  That is the usage described in
the doc, and I verified that this change fixes another bug I observed.  The
doc is here:

http://www.icu-project.org/apiref/icu4c/udat_8h.html#a4261e9fd5382197c3d86a00211c48079

I've attached a diff with both changes.  



    _______________________________________________________

File Attachments:


-------------------------------------------------------
Date: Wed 13 Sep 2017 04:54:48 PM UTC  Name: NSDateFormatter.m.patch  Size:
2KiB   By: dlobron
Suggested patch file, based on 1.24.9
<http://savannah.gnu.org/bugs/download.php?file_id=41796>

    _______________________________________________________

Reply to this item at:

  <http://savannah.gnu.org/bugs/?52011>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.gnu.org/




reply via email to

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