1
0
mirror of https://git.savannah.gnu.org/git/gnulib.git synced 2025-08-16 01:22:18 +03:00
Commit Graph

14 Commits

Author SHA1 Message Date
Paul Eggert
0e68c6a37e strftime: %z is -00 if unknown
* lib/strftime.c (DO_TZ_OFFSET): Omit arg 'negative'; it's now
the caller's responsibility to set 'negative_number'.  All uses changed.
(__strftime_internal): Put '-' before a zero UTC offset if the time
zone abbreviation starts with "-", which is the recently-introduced
tzdb convention for an unknown UTC offset that is arbitrarily set to 0.
* tests/test-strftime.c: Test for this.
2017-01-14 11:36:52 -08:00
Paul Eggert
a3fd683de3 version-etc: new year
* build-aux/gendocs.sh (version):
* doc/gendocs_template:
* doc/gendocs_template_min:
* doc/gnulib.texi:
* lib/version-etc.c (COPYRIGHT_YEAR):
Update copyright dates by hand in templates and the like.
* all files: Run 'make update-copyright'.
2017-01-01 02:59:23 +00:00
Pádraig Brady
2f8b355aea strftime,strptime: support %q to represent the quarter
* lib/strftime.c (strftime_case_): Add %q case.
* lib/strptime.c (__strptime_internal): Likewise.
* tests/test-strftime.c (quarter_test): A new test case.
2016-11-05 16:59:42 +00:00
Paul Eggert
6118065a2b Port Universal Time settings to strict POSIX
* build-aux/announce-gen, build-aux/bootstrap:
* build-aux/do-release-commit-and-tag, build-aux/git-version-gen:
* build-aux/gitlog-to-changelog, build-aux/gnu-web-doc-update:
* build-aux/gnupload, build-aux/mkinstalldirs:
* build-aux/move-if-change, build-aux/prefix-gnulib-mk:
* build-aux/update-copyright, build-aux/useless-if-before-free:
* build-aux/vc-list-files, tests/test-strftime.c:
Use TZ="UTC0", not TZ="UTC".  Either works on GNU platforms,
but POSIX says the behavior of TZ="UTC" is undefined.
2016-01-12 09:30:15 -08:00
Paul Eggert
71090a2a31 version-etc: new year
* build-aux/gendocs.sh (version):
* doc/gendocs_template:
* doc/gendocs_template_min:
* doc/gnulib.texi:
* lib/version-etc.c (COPYRIGHT_YEAR):
Update copyright dates by hand in templates and the like.
* all files: Run 'make update-copyright'.
2016-01-01 00:57:21 -08:00
Pádraig Brady
81d0a26465 strftime-tests: avoid false failure on OS X
* tests/test-strftime.c (struct localtime_rz_test): Add an
ahistorical member which is used to warn rather than fail
when tm_isdst isn't set for such entries.  This is the case for
"1970-01-01 13:00:00 +1300 (NZDT)" on Darwin 13/14 at least.
2015-12-23 00:36:05 +00:00
Paul Eggert
c1340b3d34 test-strftime: test for Solaris bug
* modules/strftime-tests (Depends-on): Add strerror.
* tests/test-strftime.c: Include <errno.h>.
(posixtm_test): New function, containing the old 'main'.
(struct tzalloc_test, struct localtime_rz_test): New types.
(TZ, LT): New static vars.
(tzalloc_test): New function.
(main): Rewrite in terms of posixtm_test and tzalloc_test.
2015-07-25 18:20:10 -07:00
Paul Eggert
a89e344969 fprintftime, strftime: use timezone_t args
* NEWS: Document the change.
* lib/fprintftime.h (fprintftime):
* lib/strftime.c (extra_args) [my_strftime]:
* lib/strftime.h (nstrftime):
Time zone arg is now of type timezone_t, not int.
* lib/strftime.c (mktime_z) [_LIBC]: New macro.
(__gmtime_r, __localtime_r) [!HAVE_TM_GMTOFF]: Remove; no longer used.
(my_strftime) [emacs && !my_strftime]:
(emacs_strftimeu) [emacs && !FPRINTFTIME]:
Remove; Emacs doesn't need this any more.
(HAVE_TZSET) [my_strftime]: Unset, since we no longer want
fprintftime and nstrftime to call tzset.
(ut) [!my_strftime]: Remove, replacing with ...
(tz) [!my_stftime]: ... this new macro.  All uses changed.
(strftime_case_): Use localtime_rz and mktime_z instead
of localtime_r and mktime.
* modules/fprintftime (Depends-on): Add time_rz.
* modules/strftime (Depends-on): Add time_rz.  Remove time_r.
* tests/test-strftime.c (main): Adjust to new nstrftime API.
2015-07-23 18:31:07 -07:00
Paul Eggert
b9bfe78424 version-etc: new year
* doc/gnulib.texi:
* lib/version-etc.c (COPYRIGHT_YEAR): Update copyright date.
* all files: Run 'make update-copyright'.
2014-12-31 17:47:54 -08:00
Eric Blake
1276a2c5f2 maint: update copyright
I ran 'make update-copyright'.

Signed-off-by: Eric Blake <eblake@redhat.com>
2014-01-01 00:07:10 -07:00
Eric Blake
9fc81090f6 maint: update all copyright year number ranges
Run "make update-copyright".  Compare to commit 1602f0a from last year.

Signed-off-by: Eric Blake <eblake@redhat.com>
2013-01-01 00:50:58 +00:00
Jim Meyering
1602f0afed maint: update all copyright year number ranges
Run "make update-copyright".
2012-01-01 10:04:58 +01:00
Alex Nelson
4e0358a6af strftime-tests: also test nanoseconds
The test-strftime program did not test the display of nanoseconds.  This
patch clarifies the expected output for a number of nanoseconds with
trailing zeroes.

* tests/test-strftime.c (T): Add a test of %N.
Signed-off-by: Alex Nelson <ajnelson@cs.ucsc.edu>
2011-12-14 09:07:49 -07:00
Jim Meyering
cf9a160da2 tests: add strftime-tests module
* tests/test-strftime.c: New file.
* modules/strftime-tests: New module.
2011-03-21 15:38:12 +01:00