Re: [PATCH] Add timegm POSIX call
Corinna Vinschen <[email protected]>
| Newsgroups | gmane.comp.lib.newlib |
|---|---|
| Message-ID | <[email protected]> |
On Aug 15 09:52, Andreas Köpke wrote: > > On Aug 13 18:17, Andrew Russell via newlib wrote: > > > >From e182faa79c35984b667029ef7b6e4a8ce7329897 Mon Sep 17 00:00:00 2001 > > > > > > From: Andrew Russell <[email protected]> > > > Date: Fri, 10 Aug 2018 12:14:18 -0700 > > > Subject: [PATCH 1/4] Start of mktime.c copy to timegm.c > > > > > > I am proposing to add the timegm POSIX call to > > > Newlib. Part of this refactors some of the code in libc/time/local.h and > > > libc/time/mktime.c, per this discussion: > > > > > > https://sourceware.org/ml/newlib/2018/msg00186.html > > > > I'm looking for comments from other (non-Cygwin) devs here. > > > > > > Thanks, > > Corinna > > I did not test it yet but we need this function. cygwin has it, but uses a > completely different codebase (localtime.cc). > > It is always needed if your default timezone is not GMT and you need to > exchange time information with e.g. sync mechanisms like NTP or GPS. You > usually get broken down time information referenced to GMT and need to re- > assemble using GMT as reference. > > Using setenv/getenv to temporarily change the timezone does not work: there is > a memory leak in the implementation. Well, at least it looks like one. Patch? Corinna -- Corinna Vinschen Cygwin Maintainer Red Hat
signature.asc
(application/pgp-signature, 833 B)
-----BEGIN PGP SIGNATURE----- iQIzBAEBCAAdFiEEoVYPmneWZnwT6kwF9TYGna5ET6AFAltz49wACgkQ9TYGna5E T6AYkQ/+MvBnIVB6ZAU0/WkskHJRPRWzi0L6+8Xje/NIJiUDqdN4lwBmLSbVP4jv VLx8/i1CAEETDBOD+O1J7n+RXXHxAPr/b+94FlhcvNGE8OaPIkTt2m+ncVJpFE0E TSQrYdN+9WLlLVFLn/m5fNNytfio7PqMRRxsdPb4pM936N92Q230z+dejBVSgciV F5rR+gWockBMhEE2VqFhg54iWERN4H6daO6SYa79cRAbxvUsa4NzJW4uj65L0qNL 9s2MuyVV7NUjKWMm/T6UNNy1Y3/G9hstjyP6HSv2oh77LOKiE/KFPz4pBWH/1syK 3/W+kTclzBBHe8YtI9E9vGteBCg5zU2IIhpYjlOCsk83VXxI6w7TZ9fz+m/Bu//z xlJcMTaMyslG+4hZTJh2Oiukl7+C+PZRVQWEQRcqFCx1iMUDGVcb5pSZeziIKH6B EOqkk8Tv9TdDl5sInL08vzjb6rXeaGoGQINlTErsfU9zQ5hqjEyQCD4zsxYW9Woo Aux03kEYvZRQV9mgLYMOyAPuPBlg1vHdoeQgNiChIY3TovWzY2MamT3N2iGCURgx MrmAZik0JHMZpaBI8/s05GX9SjrUVYMiEXYHOtqgYkTwT0gqV3pRRrZbp3Z8tgFz JD7Ca0MXXCI/aK6ri4KRJf/QW5CWGmAo7a8eAc37bRaXBfl99PY= =R2w/ -----END PGP SIGNATURE-----