<feed xmlns='http://www.w3.org/2005/Atom'>
<title>glibc/time, branch master</title>
<subtitle>Fork of glibc for development</subtitle>
<id>https://git.zx2c4.com/glibc/atom/time?h=master</id>
<link rel='self' href='https://git.zx2c4.com/glibc/atom/time?h=master'/>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/glibc/'/>
<updated>2024-07-12T15:33:28Z</updated>
<entry>
<title>time/Makefile: Split and sort tests</title>
<updated>2024-07-12T15:33:28Z</updated>
<author>
<name>Samuel Dobron</name>
<email>sdobron@redhat.com</email>
</author>
<published>2024-07-11T03:31:11Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/glibc/commit/?id=255df9299f544ad9e027e0c8d6b65b0635c59f8c'/>
<id>urn:sha1:255df9299f544ad9e027e0c8d6b65b0635c59f8c</id>
<content type='text'>
Reviewed-by: Adhemerval Zanella  &lt;adhemerval.zanella@linaro.org&gt;
</content>
</entry>
<entry>
<title>time: Avoid memcmp overread in tzset (bug 31931)</title>
<updated>2024-06-27T06:25:32Z</updated>
<author>
<name>Florian Weimer</name>
<email>fweimer@redhat.com</email>
</author>
<published>2024-06-26T17:36:58Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/glibc/commit/?id=21738846a19eb4a36981efd37d9ee7cb6d687494'/>
<id>urn:sha1:21738846a19eb4a36981efd37d9ee7cb6d687494</id>
<content type='text'>
The test does not necessarily trigger the crash, depending on memcmp
behavior.  A crash was observed in __memcmp_ia32 on i686 builds.

Reviewed-by: Paul Eggert &lt;eggert@cs.ucla.edu&gt;
</content>
</entry>
<entry>
<title>Modernize and fix doc’s “Date and Time” (BZ 31876)</title>
<updated>2024-06-15T15:53:50Z</updated>
<author>
<name>Paul Eggert</name>
<email>eggert@cs.ucla.edu</email>
</author>
<published>2024-06-08T16:48:25Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/glibc/commit/?id=ee768a30fe9099972dad04c49972c2508a208b9b'/>
<id>urn:sha1:ee768a30fe9099972dad04c49972c2508a208b9b</id>
<content type='text'>
POSIX.1-2024 (now official) specifies tm_gmtoff and tm_zone.
This is a good time to update the manual’s “Date and Time”
chapter so I went through it, fixed some outdated
stuff that had been in there for decades, and improved it to match
POSIX.1-2024 better and to clarify some implementation-defined
behavior.  Glibc already conforms to POSIX.1-2024 in these matters, so
this is merely a documentation change.

* manual/examples/strftim.c: Use snprintf instead of now-deprecated
  function asctime.  Check for localtime failure.  Simplify by using
  puts instead of fputs.  Prefer ‘buf, sizeof buf’ to less-obvious
  ‘buffer, SIZE’.

* manual/examples/timespec_subtract.c: Modernize to use struct
  timespec not struct timeval, and rename from timeval_subtract.c.
  All uses changed.  Check for overflow.  Do not check for negative
  return value, which ought to be OK since negative time_t is OK.
  Use GNU indenting style.

* manual/time.texi:

  Document CLOCKS_PER_SEC, TIME_UTC, timespec_get, timespec_getres,
  strftime_l.

  Document the storage lifetime of tm_zone and of tzname.

  Caution against use of tzname, timezone and daylight, saying that
  these variables have unspecified values when TZ is geographic.
  This is what glibc actually does (contrary to what the manual said
  before this patch), and POSIX is planned to say the same thing
  &lt;https://austingroupbugs.net/view.php?id=1816&gt;.
  Also say that directly accessing the variables is not thread-safe.

  Say that localtime_r and ctime_r don’t necessarily set time zone
  state.  Similarly, in the tzset documentation, say that it is called
  by ctime, localtime, mktime, strftime, not that it is called by all
  time conversion functions that depend on the time zone.

  Say that tm_isdst is useful mostly just for mktime, and that
  other uses should prefer tm_gmtoff and tm_zone instead.

  Do not say that strftime ignores tm_gmtoff and tm_zone, because
  it doesn’t do that.

  Document what gmtime does to tm_gmtoff and tm_zone.

  Say that the asctime, asctime_r, ctime, and ctime_r are now deprecated
  and/or obsolescent, and that behavior is undefined if the year is &lt;
  1000 or &gt; 9999.  Document strftime before these now-obsolescent
  functions, so that readers see the useful function first.

  Coin the terms “geographical format” and “proleptic format” for the
  two main formats of TZ settings, to simplify exposition.  Use this
  wording consistently.

  Update top-level proleptic syntax to match POSIX.1-2024, which glibc
  already implements.  Document the angle-bracket quoted forms of time
  zone abbreviations in proleptic TZ.  Say that time zone abbreviations
  can contain only ASCII alphanumerics, ‘+’, and ‘-’.

  Document what happens if the proleptic form specifies a DST
  abbreviation and offset but omits the rules.  POSIX says this is
  implementation-defined so we need to document it.  Although this
  documentation mentions ‘posixrules’ tersely, we need to rethink
  ‘posixrules’ since I think it stops working after 2038.

  Clarify wording about TZ settings beginning with ‘;’.

  Say that timegm is in ISO C (as of C23).

  Say that POSIX.1-2024 removed gettimeofday.

  Say that tm_gmtoff and tm_zone are extensions to ISO C, which is
  clearer than saying they are invisible in a struct ISO C enviroment,
  and gives us more wiggle room if we want to make them visible in
  strict ISO C, something that ISO C allows.

  Drop mention of old standards like POSIX.1c and POSIX.2-1992 in the
  text when the history is so old that it’s no longer useful in a
  general-purpose manual.

  Define Coordinated Universal Time (UTC), time zone, time zone ruleset,
  and POSIX Epoch, and use these phrases more consistently.

  Improve TZ examples to show more variety, and to reflect current
  practice and timestamps.  Remove obsolete example about Argentina.
  Add an example for Ireland.

  Don’t rely on GCC extensions when explaining ctime_r.

  Do not say that difftime produces the mathematically correct result,
  since it might be inexact.

  For clock_t don’t say “as in the example above” when there is no
  such example, and don’t say that casting to double works “properly
  and consistently no matter what”, as it suffers from rounding and
  overflow.

  Don’t say broken-down time is not useful for calculations; it’s
  merely painful.

  Say that UTC is not defined before 1960.

  Rename Time Zone Functions to Time Zone State.  All uses changed.

  Update Internet RFC 822 → 5322, 1305 → 5905.  Drop specific years of
  ISO 8601 as they don’t matter.

  Minor style changes: @code{"..."} → @t{"..."} to avoid overquoting in
  info files, @code → @env for environment variables, Daylight Saving
  Time → daylight saving time, white space → whitespace, prime meridian
  → Prime Meridian.
</content>
</entry>
<entry>
<title>difftime can throw exceptions</title>
<updated>2024-06-04T16:04:04Z</updated>
<author>
<name>Paul Eggert</name>
<email>eggert@cs.ucla.edu</email>
</author>
<published>2024-05-28T17:07:47Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/glibc/commit/?id=cafef3eb21db24f2e8113b0adc12c0f15d4dec41'/>
<id>urn:sha1:cafef3eb21db24f2e8113b0adc12c0f15d4dec41</id>
<content type='text'>
difftime can signal an inexact conversion when converting to double,
so it should not be marked as pure or nothrow (BZ 31808).

Although we could do something more complicated, in which difftime is
plain on modern platforms but const and nothrow on obsolescent
platforms with 32-bit time_t, it hardly seems worth the trouble.
difftime is used so rarely that it's not worth taking pains to
optimize calls to it on obsolescent platforms.

Reviewed-by: DJ Delorie &lt;dj@redhat.com&gt;
</content>
</entry>
<entry>
<title>difftime is pure, not const</title>
<updated>2024-05-27T16:10:00Z</updated>
<author>
<name>Paul Eggert</name>
<email>eggert@cs.ucla.edu</email>
</author>
<published>2024-05-27T00:37:17Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/glibc/commit/?id=df63f01a30d98f74bb6e82cbe1e27dbf795e433d'/>
<id>urn:sha1:df63f01a30d98f74bb6e82cbe1e27dbf795e433d</id>
<content type='text'>
Because difftime's behavior depends on the floating-point environment,
the function is pure, not const (BZ 31802).

Reviewed-by: Adhemerval Zanella &lt;adhemerval.zanella@linaro.org&gt;
</content>
</entry>
<entry>
<title>time: Allow later version licensing.</title>
<updated>2024-05-01T13:03:26Z</updated>
<author>
<name>Carlos O'Donell</name>
<email>carlos@redhat.com</email>
</author>
<published>2024-04-23T17:30:37Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/glibc/commit/?id=91695ee4598b39d181ab8df579b888a8863c4cab'/>
<id>urn:sha1:91695ee4598b39d181ab8df579b888a8863c4cab</id>
<content type='text'>
The FSF's Licensing and Compliance Lab noted a discrepancy in the
licensing of several files in the glibc package.

When timespect_get.c was impelemented the license did not include
the standard ", or (at your option) any later version." text.

Change the license in timespec_get.c and all copied files to match
the expected license.

This change was previously approved in principle by the FSF in
RT ticket #1316403. And a similar instance was fixed in
commit 46703efa02f6ddebce5ee54c92f7c32598de0de6.
</content>
</entry>
<entry>
<title>Always define __USE_TIME_BITS64 when 64 bit time_t is used</title>
<updated>2024-04-02T18:28:36Z</updated>
<author>
<name>Adhemerval Zanella</name>
<email>adhemerval.zanella@linaro.org</email>
</author>
<published>2024-01-18T13:18:01Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/glibc/commit/?id=a4ed0471d71739928a0d0fa3258b3ff3b158e9b9'/>
<id>urn:sha1:a4ed0471d71739928a0d0fa3258b3ff3b158e9b9</id>
<content type='text'>
It was raised on libc-help [1] that some Linux kernel interfaces expect
the libc to define __USE_TIME_BITS64 to indicate the time_t size for the
kABI.  Different than defined by the initial y2038 design document [2],
the __USE_TIME_BITS64 is only defined for ABIs that support more than
one time_t size (by defining the _TIME_BITS for each module).

The 64 bit time_t redirects are now enabled using a different internal
define (__USE_TIME64_REDIRECTS). There is no expected change in semantic
or code generation.

Checked on x86_64-linux-gnu, i686-linux-gnu, aarch64-linux-gnu, and
arm-linux-gnueabi

[1] https://sourceware.org/pipermail/libc-help/2024-January/006557.html
[2] https://sourceware.org/glibc/wiki/Y2038ProofnessDesign

Reviewed-by: DJ Delorie &lt;dj@redhat.com&gt;
</content>
</entry>
<entry>
<title>Refer to C23 in place of C2X in glibc</title>
<updated>2024-02-01T11:02:01Z</updated>
<author>
<name>Joseph Myers</name>
<email>josmyers@redhat.com</email>
</author>
<published>2024-02-01T11:02:01Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/glibc/commit/?id=42cc619dfbc44e263239c2de870bae11ad65810a'/>
<id>urn:sha1:42cc619dfbc44e263239c2de870bae11ad65810a</id>
<content type='text'>
WG14 decided to use the name C23 as the informal name of the next
revision of the C standard (notwithstanding the publication date in
2024).  Update references to C2X in glibc to use the C23 name.

This is intended to update everything *except* where it involves
renaming files (the changes involving renaming tests are intended to
be done separately).  In the case of the _ISOC2X_SOURCE feature test
macro - the only user-visible interface involved - support for that
macro is kept for backwards compatibility, while adding
_ISOC23_SOURCE.

Tested for x86_64.
</content>
</entry>
<entry>
<title>Update copyright dates with scripts/update-copyrights</title>
<updated>2024-01-01T18:53:40Z</updated>
<author>
<name>Paul Eggert</name>
<email>eggert@cs.ucla.edu</email>
</author>
<published>2024-01-01T18:12:26Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/glibc/commit/?id=dff8da6b3e89b986bb7f6b1ec18cf65d5972e307'/>
<id>urn:sha1:dff8da6b3e89b986bb7f6b1ec18cf65d5972e307</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Add checks for wday, yday and new date formats</title>
<updated>2023-06-30T09:25:39Z</updated>
<author>
<name>Martin Coufal</name>
<email>mcoufal@redhat.com</email>
</author>
<published>2023-06-19T14:05:21Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/glibc/commit/?id=9555be54ef94e5d017ce4235e4f7c4e16662e17e'/>
<id>urn:sha1:9555be54ef94e5d017ce4235e4f7c4e16662e17e</id>
<content type='text'>
tm time struct contains tm_wday and tm_yday that were previously not
checked in this test.  Also added new test cases for date formats
containing %D, %R or %h.
Reviewed-by: Carlos O'Donell &lt;carlos@redhat.com&gt;
</content>
</entry>
</feed>
