diff options
author | Nicolas Williams <nico@cryptonector.com> | 2017-05-21 16:24:48 -0500 |
---|---|---|
committer | Nicolas Williams <nico@cryptonector.com> | 2017-05-21 16:24:48 -0500 |
commit | c538237f4e4c381d35f1c15497c95f659fd55850 (patch) | |
tree | 86ae2d701edc08d00507c600bdff879f0f10916e /docs | |
parent | 4a6241be0697bbe4ef420c43689c34af59e50330 (diff) |
Deal with strptime() on OS X and *BSD (fix #1415)
strptime() on OS X and *BSDs (reputedly) does not set tm_wday and
tm_yday unless corresponding %U and %j format specifiers were used.
That can be... surprising when one parsed year, month, and day anyways.
Glibc's strptime() conveniently sets tm_wday and tm_yday in those cases,
but OS X's does not, ignoring them completely.
This commit makes jq compute those where possible, though the day of
week computation may be wrong for dates before 1900-03-01 or after
2099-12-31.
Diffstat (limited to 'docs')
-rw-r--r-- | docs/content/3.manual/manual.yml | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/docs/content/3.manual/manual.yml b/docs/content/3.manual/manual.yml index fcca8412..119d42bf 100644 --- a/docs/content/3.manual/manual.yml +++ b/docs/content/3.manual/manual.yml @@ -1908,9 +1908,11 @@ sections: Unix epoch and outputs a "broken down time" representation of Greenwhich Meridian time as an array of numbers representing (in this order): the year, the month (zero-based), the day of - the month, the hour of the day, the minute of the hour, the - second of the minute, the day of the week, and the day of the - year -- all one-based unless otherwise stated. + the month (one-based), the hour of the day, the minute of the + hour, the second of the minute, the day of the week, and the + day of the year -- all one-based unless otherwise stated. The + day of the week number may be wrong on some systems for dates + before March 1st 1900, or after December 31 2099. The `localtime` builtin works like the `gmtime` builtin, but using the local timezone setting. |