From: "R. Diez" <rdiezmail-newlib@yahoo.de>
To: Sebastian Huber <sebastian.huber@embedded-brains.de>
Cc: newlib <newlib@sourceware.org>
Subject: Re: timegm() and other time related functions
Date: Wed, 25 Jan 2023 15:23:27 +0100 [thread overview]
Message-ID: <89d0cd27-ff83-d877-3312-343b16b4f73e@yahoo.de> (raw)
In-Reply-To: <998a95d4-98c6-f434-f34d-f53ea2bea6d9@embedded-brains.de>
> while porting nats.c to RTEMS I noticed that Newlib doesn't provide a timegm() function.
> There a couple of related patches and discussions on the Newlib mailing list in the last years.
I tried to contribute an implementation of timegm() to Newlib a while ago, but after the reactions I got in this mailing list, I ended up contributing it to Picolibc instead. Search for timegm here:
https://github.com/picolibc/picolibc/blob/main/newlib/libc/time/mktime.c
This is the first commit:
https://github.com/picolibc/picolibc/commit/1a697a5228a04461066b851dfd96b1ddbbd603fa
And this commit adds the documentation for timegm:
https://github.com/picolibc/picolibc/commit/64d77e6dfefc4cdd40fda477d1d25f7a98d09c16
The affected files may have changed since them, so I would check the latest versions anyway.
I also contributed some tests for timegm. By the way, is the Newlib test suite still broken?
The timegm implementation actually needed little new code, it was basically a small reorganisation of existing Newlib code.
Regards,
R. Diez
prev parent reply other threads:[~2023-01-25 14:23 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-01-25 13:57 Sebastian Huber
2023-01-25 14:23 ` R. Diez [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=89d0cd27-ff83-d877-3312-343b16b4f73e@yahoo.de \
--to=rdiezmail-newlib@yahoo.de \
--cc=newlib@sourceware.org \
--cc=sebastian.huber@embedded-brains.de \
/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.
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 read-only IMAP folder(s) and NNTP newsgroup(s).