From: Rich Felker <dalias@libc.org>
To: Alba Pompeo <albapompeo@gmail.com>
Cc: r-devel <r-devel@r-project.org>, musl@lists.openwall.com
Subject: Re: Re: Fwd: [Rd] [musl] strptime() question
Date: Sat, 6 Feb 2016 17:55:23 -0500 [thread overview]
Message-ID: <20160206225522.GX9349@brightrain.aerifal.cx> (raw)
In-Reply-To: <CAJDAfTDftYEGsHOyqadm-V360xh2-sL2s8qDNHfAm0Ryu=+-bg@mail.gmail.com>
On Sat, Feb 06, 2016 at 10:35:28AM -0200, Alba Pompeo wrote:
> It is setting TZ and using tzset(). R is not multi-threaded so it is safe.
>
> Simon figure out the important settings from the config.log and
> config.h files on a musl system:
>
> /* #undef USE_INTERNAL_MKTIME */
> #define HAVE_TM_GMTOFF 1
> #define HAVE_TM_ZONE 1
>
> Does this help anyone debug the issue? Simon just went on vacation.
R's src/main/datetime.c does A LOT of munging to the output of
strptime and I wouldn't be surprised if they're making nonportable
assumptions about it. Note that the underlying C strptime function has
nothing to do with timezones or time conversion; it's basically just a
time-tailored sscanf that reads integers and strings from the input
string and converts them into values in the fields of struct tm.
It also looks like R isn't even calling the system strptime but
instead using its own R_strptime. I think that supports my theory that
the problem is in the munging being done after the string is parsed.
Rich
prev parent reply other threads:[~2016-02-06 22:55 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-02-04 15:27 Alba Pompeo
2016-02-04 16:07 ` Rich Felker
[not found] ` <CAJDAfTCENy0dyAYP5612OSMnNBc5U-AGjEoOgVgF1VisjDs8=g@mail.gmail.com>
[not found] ` <E98A2A10-27B5-48EF-988E-506F69E84BA6@r-project.org>
[not found] ` <CAJDAfTBwMx5eb5L+A2fbCpMB1ez-N+KdNViu69HkxAqfZs6RCg@mail.gmail.com>
2016-02-04 21:32 ` Fwd: [Rd] [musl] " Rich Felker
2016-02-06 12:35 ` Alba Pompeo
2016-02-06 22:55 ` Rich Felker [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20160206225522.GX9349@brightrain.aerifal.cx \
--to=dalias@libc.org \
--cc=albapompeo@gmail.com \
--cc=musl@lists.openwall.com \
--cc=r-devel@r-project.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.vuxu.org/mirror/musl/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).