| #
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 ...
|
| #
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 ...
|
| #
d0b2dbfa
|
| 16-Aug-2023 |
Warner Losh <imp@FreeBSD.org> |
Remove $FreeBSD$: one-line sh pattern
Remove /^\s*#[#!]?\s*\$FreeBSD\$.*$\n/
|
| #
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 ...
|
| #
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 ...
|
| #
d0b2dbfa
|
| 16-Aug-2023 |
Warner Losh <imp@FreeBSD.org> |
Remove $FreeBSD$: one-line sh pattern
Remove /^\s*#[#!]?\s*\$FreeBSD\$.*$\n/
|
| #
f9c0a512
|
| 10-Aug-2018 |
Dimitry Andric <dim@FreeBSD.org> |
Merge ^/head r337286 through r337585.
|
| #
14b841d4
|
| 11-Aug-2018 |
Kyle Evans <kevans@FreeBSD.org> |
MFH @ r337607, in preparation for boarding
|
| #
2c77ec54
|
| 04-Aug-2018 |
Conrad Meyer <cem@FreeBSD.org> |
date(1): Add ISO 8601 formatting option
The new flag is named '-I'. It is documented in the manual page and covered by basic unit tests.
|
| #
9268022b
|
| 19-Nov-2014 |
Simon J. Gerraty <sjg@FreeBSD.org> |
Merge from head@274682
|
| #
246e7a2b
|
| 02-Sep-2014 |
Neel Natu <neel@FreeBSD.org> |
IFC @r269962
Submitted by: Anish Gupta (akgupt3@gmail.com)
|
| #
1b833d53
|
| 13-Aug-2014 |
Alexander V. Chernikov <melifaro@FreeBSD.org> |
Sync to HEAD@r269943.
|
| #
9f312407
|
| 13-Aug-2014 |
Enji Cooper <ngie@FreeBSD.org> |
Port date/bin/tests to ATF
Phabric: D545 Approved by: jmmv (mentor) Submitted by: keramida (earlier version) MFC after: 2 weeks Sponsored by: Google, Inc Sponsored by: EMC / Isilon Storage Division
|
| #
14b841d4
|
| 11-Aug-2018 |
Kyle Evans <kevans@FreeBSD.org> |
MFH @ r337607, in preparation for boarding
|
| #
2c77ec54
|
| 04-Aug-2018 |
Conrad Meyer <cem@FreeBSD.org> |
date(1): Add ISO 8601 formatting option
The new flag is named '-I'. It is documented in the manual page and covered by basic unit tests.
|
| #
9268022b
|
| 19-Nov-2014 |
Simon J. Gerraty <sjg@FreeBSD.org> |
Merge from head@274682
|
| #
246e7a2b
|
| 02-Sep-2014 |
Neel Natu <neel@FreeBSD.org> |
IFC @r269962
Submitted by: Anish Gupta (akgupt3@gmail.com)
|
| #
1b833d53
|
| 13-Aug-2014 |
Alexander V. Chernikov <melifaro@FreeBSD.org> |
Sync to HEAD@r269943.
|
| #
9f312407
|
| 13-Aug-2014 |
Enji Cooper <ngie@FreeBSD.org> |
Port date/bin/tests to ATF
Phabric: D545 Approved by: jmmv (mentor) Submitted by: keramida (earlier version) MFC after: 2 weeks Sponsored by: Google, Inc Sponsored by: EMC / Isilon Storage Division
|
| #
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 ...
|
| #
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 ...
|
| #
d0b2dbfa
|
| 16-Aug-2023 |
Warner Losh <imp@FreeBSD.org> |
Remove $FreeBSD$: one-line sh pattern
Remove /^\s*#[#!]?\s*\$FreeBSD\$.*$\n/
|
| #
14b841d4
|
| 11-Aug-2018 |
Kyle Evans <kevans@FreeBSD.org> |
MFH @ r337607, in preparation for boarding
|
| #
f9c0a512
|
| 10-Aug-2018 |
Dimitry Andric <dim@FreeBSD.org> |
Merge ^/head r337286 through r337585.
|