| #
38839c87
|
| 11-Nov-2025 |
Dag-Erling Smørgrav <des@FreeBSD.org> |
date: Improve nanosecond support
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
date: Improve nanosecond support
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
show more ...
|
| #
a8ddd192
|
| 04-Sep-2024 |
Dag-Erling Smørgrav <des@FreeBSD.org> |
date: Fix a few nits.
* 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. Re
date: Fix a few nits.
* 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
show more ...
|
| #
dafb424b
|
| 28-Apr-2024 |
Dag-Erling Smørgrav <des@FreeBSD.org> |
date: Correctly check outcome of mktime().
X-MFC-With: 7b390cb63689 Reviewed by: markj Differential Revision: https://reviews.freebsd.org/D44982
|
| #
7b390cb6
|
| 26-Apr-2024 |
Mateusz Piotrowski <0mp@FreeBSD.org> |
date: Fix tests by initializing timespec structure
The tests related to nanosecond support were failing on amd64 due to uninitialized timespec structure.
Fixes: eeb04a736cb9 date: Add support for
date: Fix tests by initializing timespec structure
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
show more ...
|
| #
eeb04a73
|
| 21-Apr-2024 |
Mateusz Piotrowski <0mp@FreeBSD.org> |
date: Add support for nanoseconds
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 co
date: Add support for nanoseconds
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
show more ...
|
| #
e043f372
|
| 24-Nov-2023 |
Warner Losh <imp@FreeBSD.org> |
bin: Automated cleanup of cdefs and other formatting
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.
Remov
bin: Automated cleanup of cdefs and other formatting
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
show more ...
|
| #
0b8224d1
|
| 24-Nov-2023 |
Warner Losh <imp@FreeBSD.org> |
Remove copyright strings ifdef'd out
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.
Remove copyright strings ifdef'd out
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
show more ...
|
| #
90aea514
|
| 23-Nov-2023 |
Warner Losh <imp@FreeBSD.org> |
bin: Remove ancient SCCS tags.
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 s
bin: Remove ancient SCCS tags.
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
show more ...
|
| #
1d386b48
|
| 16-Aug-2023 |
Warner Losh <imp@FreeBSD.org> |
Remove $FreeBSD$: one-line .c pattern
Remove /^[\s*]*__FBSDID\("\$FreeBSD\$"\);?\s*\n/
|
| #
e9746806
|
| 07-Jul-2023 |
Alfonso Gregory <gfunni234@gmail.com> |
Mark usage function as __dead2 in programs where it does not return
In most cases, usage does not return, so mark them as __dead2. For the cases where they do return, they have not been marked __dea
Mark usage function as __dead2 in programs where it does not return
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
show more ...
|
| #
31edf56b
|
| 19-May-2023 |
Baptiste Daroussin <bapt@FreeBSD.org> |
date: add -z output_zone option
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:
date: add -z output_zone option
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
show more ...
|
| #
c537bf9d
|
| 03-Nov-2021 |
Mateusz Piotrowski <0mp@FreeBSD.org> |
date: Capitalize seconds string in synopses
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 r
date: Capitalize seconds string in synopses
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
show more ...
|
| #
a12b16f4
|
| 03-Nov-2021 |
Mateusz Piotrowski <0mp@FreeBSD.org> |
date: Clean up synopses
MFC after: 3 days
|
| #
7648bc9f
|
| 13-May-2019 |
Alan Somers <asomers@FreeBSD.org> |
MFHead @347527
Sponsored by: The FreeBSD Foundation
|
| #
8b82def3
|
| 24-Apr-2019 |
Warner Losh <imp@FreeBSD.org> |
Restore the -n flag parsing, but ignore it.
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 (
Restore the -n flag parsing, but ignore it.
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).
show more ...
|
| #
415e34c4
|
| 29-Mar-2019 |
Alan Somers <asomers@FreeBSD.org> |
MFHead@r345677
|
| #
e77a99c1
|
| 21-Mar-2019 |
Warner Losh <imp@FreeBSD.org> |
Remove -n flag, fix setting date / time
r342139 bork setting the date. This fixes it by simply removing the -n flag.
Differential Revision: https://reviews.freebsd.org/D19668
|
| #
2aaf9152
|
| 18-Mar-2019 |
Alan Somers <asomers@FreeBSD.org> |
MFHead@r345275
|
| #
d24ba0bb
|
| 12-Mar-2019 |
Warner Losh <imp@FreeBSD.org> |
Remove now useless -d and -t flags.
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 faithfu
Remove now useless -d and -t flags.
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
show more ...
|
| #
53fc043d
|
| 15-Dec-2018 |
George V. Neville-Neil <gnn@FreeBSD.org> |
Remove, the now very outdated, timed.
Submitted by: Kyle Spiers ksspiers at gmail Reviewed by: bcr,brooks,bz,sbruno Relnotes: yes Differential Revision: https://reviews.freebsd.org/D18505
|
| #
f9c0a512
|
| 10-Aug-2018 |
Dimitry Andric <dim@FreeBSD.org> |
Merge ^/head r337286 through r337585.
|
| #
38839c87
|
| 11-Nov-2025 |
Dag-Erling Smørgrav <des@FreeBSD.org> |
date: Improve nanosecond support
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
date: Improve nanosecond support
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
show more ...
|
| #
a8ddd192
|
| 04-Sep-2024 |
Dag-Erling Smørgrav <des@FreeBSD.org> |
date: Fix a few nits.
* 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. Re
date: Fix a few nits.
* 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
show more ...
|
| #
dafb424b
|
| 28-Apr-2024 |
Dag-Erling Smørgrav <des@FreeBSD.org> |
date: Correctly check outcome of mktime().
X-MFC-With: 7b390cb63689 Reviewed by: markj Differential Revision: https://reviews.freebsd.org/D44982
|
| #
7b390cb6
|
| 26-Apr-2024 |
Mateusz Piotrowski <0mp@FreeBSD.org> |
date: Fix tests by initializing timespec structure
The tests related to nanosecond support were failing on amd64 due to uninitialized timespec structure.
Fixes: eeb04a736cb9 date: Add support for
date: Fix tests by initializing timespec structure
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
show more ...
|