1
0
Fork 0
mirror of git://git.code.sf.net/p/cdesktopenv/code synced 2025-03-09 15:50:02 +00:00
cde/src/cmd/ksh93/data
Johnothan King 9526b3fa08
Fix unexpected output from 'printf %T' with certain formats (#65)
This commit changes the behavior of four date formats accepted
by 'printf %()T' because the old behavior is not compatible with
modern implementations of date(1):
- %k and %l now return a blank-padded hour, the former based on a
  24-hour clock and the latter a 12-hour clock (these are common
  extensions present on Linux and *BSD).
- %f now returns a date with the format '%Y.%m.%d-%H:%M:%S'
  (BusyBox extension).
- %q now returns the quarter of the current year (GNU extension).

src/cmd/ksh93/data/builtins.c:
- Copy the date format documentation from date in libcmd to
  the printf man page (for documenting 'printf %T').

src/cmd/ksh93/tests/builtins.sh:
- Add four regression tests for the changed date formats.

src/cmd/ksh93/sh.1:
- Remove inaccurate information about the date formats accepted by
  printf %T'. The KornShell uses a custom version of strftime(3)
  that isn't guaranteed to accepts the same formats as the native
  strftime function.

src/lib/libast/tm/tmxfmt.c:
- Change the behavior of %f, %k, %l and %q to the common behavior.
  %k and %l are implemented as aliases to %_H and %_I to avoid
  duplicating code.

src/lib/libcmd/date.c:
- Update the documentation for the AST date command since it is
  also affected by the changes to 'printf %T'.

Fixes #62
2020-07-09 05:08:28 +01:00
..
aliases.c Make 'stop' and 'suspend' regular built-ins 2020-06-22 15:36:29 +02:00
bash_pre_rc.sh Version: 2012-08-01-master 2016-01-11 15:54:23 -05:00
builtins.c Fix unexpected output from 'printf %T' with certain formats (#65) 2020-07-09 05:08:28 +01:00
keywords.c Version: 2012-08-01-master 2016-01-11 15:54:23 -05:00
lexstates.c Version: 2012-08-01-master 2016-01-11 15:54:23 -05:00
limits.c Fix 80 typos in comments 2020-06-12 01:45:12 +02:00
math.tab Version: 2012-08-01-master 2016-01-11 15:54:23 -05:00
msg.c Make 'stop' and 'suspend' regular built-ins 2020-06-22 15:36:29 +02:00
options.c Version: 2012-08-01-master 2016-01-11 15:54:23 -05:00
signals.c Fix 'kill -INFO' on systems that support SIGINFO (#59) 2020-07-04 15:57:47 +01:00
strdata.c Version: 2012-08-01-master 2016-01-11 15:54:23 -05:00
testops.c Remove code related to long-dead 3DFS research project 2020-06-12 01:45:17 +02:00
variables.c Fix unreliable behavior when special vars are readonly or unset (#27) 2020-06-20 18:08:41 +01:00