| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
|
|
|
|
|
|
| |
Add support for a field width, which defaults to 9 if unspecified or
zero. If the width is not exactly 9, we have to either cut off digits
or append zeroes to make up the difference. If the width is a dash,
we pick a width based on the clock's reported resolution. This brings
us in line with GNU coreutils.
PR: 287080
MFC after: 1 week
Reviewed by: 0mp
Differential Revision: https://reviews.freebsd.org/D53667
|
| |
|
|
|
|
|
|
|
|
| |
Specifically, remove Tn macors, replace Li with Ql, and escape %N to
address date.1's rendering issues on man.freebsd.org.
PR: 290801
Reported by: jinwookjeongg@gmail.com
MFC after: 1 week
Sponsored by: Klara, Inc.
|
| |
|
|
|
|
|
|
|
|
|
| |
* ISO 8601 defines two formats: basic and extended, clarify that we
output the extended format only.
* Clarify that ISO 8601 is only aware of timezone /offsets/, not timezones,
it has no relation to the Olson timezone database (TZ environment variable).
Reviewed by: otis (mentor), des
MFC after: 3 days
Differential Revision: https://reviews.freebsd.org/D52314
|
| |
|
|
|
|
|
|
|
|
|
| |
* Fix spurious capitalization.
* Fix inconsistent quoting.
* Use `Dq` rather than ASCII double quotes.
MFC after: 3 days
Sponsored by: Klara, Inc.
Reviewed by: 0mp
Differential Revision: https://reviews.freebsd.org/D46622
|
| |
|
|
|
|
|
|
|
|
|
| |
* Don't use `asprintf()` when `strdup()` can do the job just as well.
* Fix a couple of typos in a comment.
Fixes: eeb04a736cb9
MFC after: 3 days
Sponsored by: Klara, Inc.
Reviewed by: markj
Differential Revision: https://reviews.freebsd.org/D46533
|
| |
|
|
|
|
|
| |
This is a residual of the $FreeBSD$ removal.
MFC After: 3 days (though I'll just run the command on the branches)
Sponsored by: Netflix
|
| |
|
|
| |
Sponsored by: Klara, Inc.
|
| |
|
|
|
|
| |
X-MFC-With: 7b390cb63689
Reviewed by: markj
Differential Revision: https://reviews.freebsd.org/D44982
|
| |
|
|
|
|
|
|
|
|
| |
The tests related to nanosecond support were failing on amd64 due to
uninitialized timespec structure.
Fixes: eeb04a736cb9 date: Add support for nanoseconds
Reviewed by: markj
Sponsored by: Klara, Inc.
Differential Revision: https://reviews.freebsd.org/D44975
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This patch introduces support for a conversion specification for
nanoseconds.
The format of %N is meant to be compatible with that of GNU date.
The nanoseconds conversion specification is implemented directly in
date(1) instead of libc (in strftime(3)) to avoid introducing
non-standard functions to libc at this time and modifying struct tm.
Apart from introducing the nanoseconds conversion specification, this
patch brings the following changes:
- The "ns" format for ISO 8061 dates is now unlocked. E.g., date -Ins
prints:
2024-04-22T12:20:28,763742224+02:00
- The -r flag when fed a file is now aware of the nanosecond part of the last
modification time.
- date(1) is now able to set the time with nanosecond precision. It is
not possible as of now to do that by specifying nanoseconds directly
via the command-line arguments. Instead, the -r flag can be used.
- date(1) is now using the clock_gettime(3) family of functions instead
of ctime(3) family of functions where possible.
Reviewed by: des, markj
Sponsored by: Klara, Inc.
Differential Revision: https://reviews.freebsd.org/D44905
|
| |
|
|
|
| |
Event: Advanced UNIX programming course (Fall'23) at NTHU
Pull Request: https://github.com/freebsd/freebsd-src/pull/1035
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Apply the following automated changes to try to eliminate
no-longer-needed sys/cdefs.h includes as well as now-empty
blank lines in a row.
Remove /^#if.*\n#endif.*\n#include\s+<sys/cdefs.h>.*\n/
Remove /\n+#include\s+<sys/cdefs.h>.*\n+#if.*\n#endif.*\n+/
Remove /\n+#if.*\n#endif.*\n+/
Remove /^#if.*\n#endif.*\n/
Remove /\n+#include\s+<sys/cdefs.h>\n#include\s+<sys/types.h>/
Remove /\n+#include\s+<sys/cdefs.h>\n#include\s+<sys/param.h>/
Remove /\n+#include\s+<sys/cdefs.h>\n#include\s+<sys/capsicum.h>/
Sponsored by: Netflix
|
| |
|
|
|
|
|
|
|
|
|
| |
We've ifdef'd out the copyright strings for some time now. Go ahead and
remove the ifdefs. Plus whatever other detritis was left over from other
recent removals. These copyright strings are present in the comments and
are largely from CSRG's attempt at adding their copyright to every
binary file (which modern interpretations of the license doesn't
require).
Sponsored by: Netflix
|
| |
|
|
|
|
|
|
| |
Remove ancient SCCS tags from the tree, automated scripting, with two
minor fixup to keep things compiling. All the common forms in the tree
were removed with a perl script.
Sponsored by: Netflix
|
| |
|
|
| |
Remove /^\.\\"\s*\$FreeBSD\$$\n/
|
| |
|
|
| |
Remove /^\s*#[#!]?\s*\$FreeBSD\$.*$\n/
|
| |
|
|
| |
Remove /^[\s*]*__FBSDID\("\$FreeBSD\$"\);?\s*\n/
|
| |
|
|
| |
Remove /^\s*\*\n \*\s+\$FreeBSD\$$\n/
|
| |
|
|
|
|
|
|
| |
In most cases, usage does not return, so mark them as __dead2. For the
cases where they do return, they have not been marked __dead2.
Reviewed by: imp
Pull Request: https://github.com/freebsd/freebsd-src/pull/735
|
| |
|
|
|
|
| |
Use uint64_t instead of long, as this type is not correct for platforms like i386 or armv7.
Pointed out by: imp
|
| |
|
|
|
|
|
|
| |
Use long instead of int for numerous calculations, fixing a number of
date calculation overflow issues.
Obtained from: DragonflyBSD
Git log: 4238ce6f0c6df33ce677ae298b245c62cd60fb43 (only partial)
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
Inpired by OpenBSD date(1), this option allows to do timezone conversion
via the date(1) command.
For example, to determine when the BSDCan livestream begins for me:
$ env -i TZ=EST5EDT date -z Europe/Paris -j 0900
MFC After: 1 week
Reviewed by: kib, bcr (manpage)
Differential Revision: https://reviews.freebsd.org/D40159
|
| | |
|
| | |
|
| |
|
|
|
| |
MFC after: 1 month
Sponsored by: Klara Inc.
|
| |
|
|
|
|
|
|
|
|
|
| |
The use of 'package' in this could be understood to mean a FreeBSD
package provided by pkg, rather than the fact that we use data provided
by IANA. Re-word it to clearly identify `tzdata` as the IANA Time Zone
Database on first use, then drop subsequent uses of the word 'package'.
Reviewed by: 0mp, pauamma, philip
Sponsored by: Klara, Inc.
Differential Revision: https://reviews.freebsd.org/D35966
|
| |
|
|
|
|
|
|
|
|
|
| |
The previous description was both incorrect and incomplete in its
description -- the 2038 limit doesn't apply on !i386 platforms, and
it didn't note that values above 100 are accepted and interpreted
differently. Further, it didn't note that absolute years are accepted.
Reviewed by: pauamma_gundo.com (manpages)
Sponsored by: Klara, Inc.
Differential Revision: https://reviews.freebsd.org/D35360
|
| |
|
|
| |
Reported by: 0mp@
|
| |
|
|
|
|
| |
Add references.
Reported by: philip@
|
| |
|
|
|
| |
Reviewed by: peterj@
MFC after: 2 weeks
|
| |
|
|
|
|
|
|
| |
This makes it consistent with other date(1) implementations. Also, it
feels more consistent since hours and minutes are already represented as
HH and MM respectively.
MFC after: 3 days
|
| |
|
|
| |
MFC after: 3 days
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
- Use Cm instead of Ar or Sq for command modifiers of the -v flag.
- Remove unnecessary "Ar ..." from the synopsis. It's not clear what it
was referring to.
- Add missing arguments to the -f and -v flags.
- Stylize the dot before "ss" with Cm in the default format in the -f
flag description.
- Set LC_ALL=C in the last example so that the output format of
date(1) always matches the specified format of the -f flag not matter
the locale.
- List the -f flag as optional in all usage lines in the synopsis.
MFC after: 3 days
|
| |
|
|
|
|
|
|
| |
These flags were removed in 2019.
PR: 256631
Submitted by: David Fiander <david@fiander.info>
MFC After: 3 days
|
| |
|
|
|
|
|
|
|
| |
PR: 248918
MFC after: 1 week
Sponsored by: The FreeBSD Foundation
Notes:
svn path=/head/; revision=364790
|
| |
|
|
|
|
|
|
|
|
| |
Since D19668 was done, new users of the -n flag have surfaced. Parse
and ignore it on the command line until they can be updated.
Suggested by: rgrimes (in D19668).
Notes:
svn path=/head/; revision=346624
|
| |
|
|
|
|
|
|
|
|
| |
r342139 bork setting the date. This fixes it by simply removing the -n
flag.
Differential Revision: https://reviews.freebsd.org/D19668
Notes:
svn path=/head/; revision=345365
|
| |
|
|
|
|
|
|
|
| |
Remove -d and -t flags that were removed in r345050.
Noticed by: rgrimes@
Notes:
svn path=/head/; revision=345081
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
These were used to set dst flag and minutes west of UTC
respectively. These are obsolete and have been removed form the
kernel. These existed primarily to faithfully emulate early
Unix ABIs that have been removed from FreeBSD.
Reviewed by: jbh@, brooks@
Differential Revision: https://reviews.freebsd.org/D19550
Notes:
svn path=/head/; revision=345050
|
| |
|
|
|
|
|
|
|
|
| |
Submitted by: Kyle Spiers ksspiers at gmail
Reviewed by: bcr,brooks,bz,sbruno
Relnotes: yes
Differential Revision: https://reviews.freebsd.org/D18505
Notes:
svn path=/head/; revision=342139
|
| |
|
|
|
|
|
|
| |
The new flag is named '-I'. It is documented in the manual page and covered
by basic unit tests.
Notes:
svn path=/head/; revision=337332
|
| |
|
|
|
|
|
|
|
|
|
| |
Missed these in r334501; see justification there:
https://svnweb.freebsd.org/base?view=revision&revision=334501
Sponsored by: Dell EMC Isilon
Notes:
svn path=/head/; revision=334502
|
| |
|
|
|
|
|
|
|
| |
we shouldn't leak stack garbage into the field.
Sponsored by: Netflix
Notes:
svn path=/head/; revision=328282
|
| |
|
|
|
|
|
|
|
|
|
| |
Many style-level issues are still reported.
Submitted by: Yuri Pankov <yuripv@gmx.com>
Reviewed by: jilles (previous revision)
Differential Revision: https://reviews.freebsd.org/D13334
Notes:
svn path=/head/; revision=326651
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Mainly focus on files that use BSD 3-Clause license.
The Software Package Data Exchange (SPDX) group provides a specification
to make it easier for automated tools to detect and summarize well known
opensource licenses. We are gradually adopting the specification, noting
that the tags are considered only advisory and do not, in any way,
superceed or replace the license texts.
Special thanks to Wind River for providing access to "The Duke of
Highlander" tool: an older (2014) run over FreeBSD tree was useful as a
starting point.
Notes:
svn path=/head/; revision=326025
|
| |
|
|
|
|
|
| |
Sponsored by: Dell EMC Isilon
Notes:
svn path=/head/; revision=325188
|
| |
|
|
|
|
|
|
|
| |
`SUBDIR.${MK_TESTS}+= tests` idiom.
This is a follow up to r321912.
Notes:
svn path=/projects/make-check-sandbox/; revision=321914
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
directories to SUBDIR.${MK_TESTS} idiom
This is being done to pave the way for future work (and homogenity) in
^/projects/make-check-sandbox .
No functional change intended.
MFC after: 1 weeks
Notes:
svn path=/head/; revision=321912
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
localtime(3) returns NULL when passed an invalid time_t but date(1)
previously did not handle it. Exit with an error in that case.
PR: 220828
Reported by: Vinícius Zavam
Reviewed by: cem, kevans
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D11660
Notes:
svn path=/head/; revision=321293
|
| |
|
|
|
|
|
|
|
|
|
|
| |
Renumber cluase 4 to 3, per what everybody else did when BSD granted
them permission to remove clause 3. My insistance on keeping the same
numbering for legal reasons is too pedantic, so give up on that point.
Submitted by: Jan Schaumann <jschauma@stevens.edu>
Pull Request: https://github.com/freebsd/freebsd/pull/96
Notes:
svn path=/head/; revision=314436
|