Age | Commit message (Collapse) | Author | |
---|---|---|---|
2022-09-23 | Since tzset(3) ignores arbitrary files, we no longer need rpath | Florian Obser | |
and can depend on the /usr/share/zoneinfo bypass. OK mestre, millert, deraadt | |||
2022-09-19 | When setting time, date(1) pledges "wpath" for logwtmp(3). Restrict | Florian Obser | |
this using unveil(2), but ignore errors if /var/log doesn't exist. We want to be able to set the time if the system is damanged or /var is not mounted yet. We also need to unveil everything for reading since we still allow arbitrary locations of zone info files. Hopefully that will go away soon. OK deraadt | |||
2021-08-11 | If the -f argument includes %s, we need to use timegm(3) rather | Ingo Schwarze | |
than mktime(3) because the UNIX Epoch is defined in UTC rather than in the local timezone. Combining %s with other format specifiers is usually not useful. But if a user does that, then parsing the whole input as UTC seems better than parsing some of it as UTC and some of it in the local time zone. Bug found by Bryan Vyhmeister. The final patch is joint work with and OK by gerhard@. No objection when shown on tech@. | |||
2021-04-29 | Use a universally understood example time (with AM, which is even easier | Theo de Raadt | |
to understand) from Edgar Pettijohn | |||
2019-08-08 | date(1): remove -d dst and -t minutes_west | cheloha | |
Part of the kernel timezone removal effort. With input from deraadt@ and tedu@. "burn it!" mpi@, ok tedu@ deraadt@ | |||
2019-06-28 | When system calls indicate an error they return -1, not some arbitrary | Theo de Raadt | |
value < 0. errno is only updated in this case. Change all (most?) callers of syscalls to follow this better, and let's see if this strictness helps us in the future. | |||
2019-01-22 | -p got changed to -f; | Jason McIntyre | |
2019-01-21 | add a -f pformat flag to parse the given time with strptime. | Ted Unangst | |
2018-10-17 | - add an example to date(1) showing how to convert between timezones | Jason McIntyre | |
- update the description of TZ in date(1) - mention some relevant info to avoid sending the reader to another page and, when they have to refer to another page, send them to tzset(3) rather than environ(7) - update the timezone name used in environ(7), as advised by millert ok millert | |||
2018-04-25 | The time-setting codepath can use pledge "settime" which was added for | Theo de Raadt | |
ntpd, but apparently date was never revisited. "wpath" is for wtmp logging. "rpath" for the case where -z argument isn't in the standard timezone dir. discussed with tb and guenther | |||
2018-02-13 | atoll -> strtonum | cheloha | |
ok millert@ tb@ | |||
2017-12-23 | As we only use the .tv_sec field, simplify gettimeofday(2) -> time(3). | cheloha | |
While here, use err(3) instead of errx(3) if adjtime(2) fails. Discussed/tweaked with/by tb@ and jca@. ok tb@ jca@ | |||
2017-07-09 | remove redundant variable declarations in Makefiles, since those are | Marc Espie | |
the default. okay millert@ | |||
2016-10-19 | Delete useless setlocale(3) in src/bin/. | Ingo Schwarze | |
Minor cleanup while here: return from main, static void __dead usage, etc. Based on a patch from Jan Stary <hans at stare dot cz>. Feedback and OK tb@, OK millert@. | |||
2016-09-12 | Remove mention of "remote time" in description for the -a flag. | Jeremie Courreges-Anglas | |
timed(8) support for date(1) was removed years ago. ok millert@ deraadt@ | |||
2015-10-09 | Change all tame callers to namechange to pledge(2). | Theo de Raadt | |
2015-10-07 | tame "stdio rpath wpath". rpath is for localtime() and mktime(), | Theo de Raadt | |
while wpath is for logwtmp(), a bit pessimistically since it is not clear what could happen. This is done AFTER the time is potentially set, since settimeofday() is not available to us. Improvements and tests would be welcome. | |||
2015-09-25 | drop useless .No, .Ns, and quoting | Ingo Schwarze | |
2015-04-17 | FALLTHROUGH in getopt is incorrect. While here use strtonum | Theo de Raadt | |
to parse tz_minuteswest. ok millert | |||
2015-03-17 | Eliminate use of TM_YEAR_BASE. OK guenther@ deraadt@ miod@ | Todd C. Miller | |
2015-03-15 | tzfile.h is an internal header that should never have been installed. | Todd C. Miller | |
What's worse, the tzfile.h that gets installed is over 20 years old and doesn't match the real tzfile.h in libc/time. This makes the tree safe for /usr/include/tzfile.h removal. The TM_YEAR_BASE define has been moved to time.h temporarily until its usage is replaced by 1900 in the tree. Actual removal of tzfile.h is pending a ports build. Based on a diff from deraadt@ | |||
2015-02-07 | When getopt processing flags, many should be flag=1 instead of flag++ | Theo de Raadt | |
ok tedu miod | |||
2015-01-15 | remove .Tn; from Jan Stary <hans at stare dot cz> | Ingo Schwarze | |
2014-02-14 | reference xsi, not xpg; | Jason McIntyre | |
ok millert schwarze sobrado (or standards@ as i'm tempted to call them ;) | |||
2014-01-21 | localtime(3) can return NULL; seen by Rod Whitworth; ok guenther@ | Otto Moerbeek | |
2014-01-05 | comma previous; | Jason McIntyre | |
2014-01-05 | garbage collect unused global variable retval, | Ingo Schwarze | |
forgotten in rev. 1.36 when removing timed(8) support; proofed by sobrado@ | |||
2014-01-05 | some conversion specifiers are not required by POSIX; | Ingo Schwarze | |
joint work and OK jmc@ sobrado@ | |||
2014-01-05 | date(1) can only exit(0) or exit(1), not exit(2), so make this .Ex -std; | Ingo Schwarze | |
obviouly, this was forgotten in rev. 1.57 when removing timed(8) support. ok jmc@ sobrado@ | |||
2014-01-03 | note that our date supports traditional bsd date format, which is | Jason McIntyre | |
different to what posix/xpg specifies; diff originally posted to tech, changed after some feedback from kettenis, then a bit more from schwarze and sobrado; ok schwarze sobrado | |||
2013-11-27 | remove erroneous char cast to switch expression processing getopt(3); | Okan Demirmen | |
not used in any cases. ok deraadt@, guenther@, millert@ | |||
2013-11-21 | add unsigned char casts for specific calls to ctype.h macros. | Theo de Raadt | |
ok guenther step | |||
2013-10-20 | Parse the argument the -r option with atoll() to support dates past 2038 | Philip Guenther | |
from J Drivdal (xjd (at) rivu.net) | |||
2012-12-04 | replace sys/param.h with sys/types.h (and sometimes add limits.h if needed) | Theo de Raadt | |
ok guenther | |||
2011-08-31 | use the same format/text, as far as possible, for date strings; | Jason McIntyre | |
help/ok guenther millert | |||
2011-07-08 | extern.h no longer needed | Theo de Raadt | |
2011-07-08 | remove a closing (unmatched) Re, missed in previous; | Jason McIntyre | |
2011-07-07 | timed's time is up. use ntpd(8). Even our own fossil developers | Theo de Raadt | |
switched a while back. ok miod, kettenis | |||
2011-03-11 | add -z to the extensions list in STANDARDS; | Jason McIntyre | |
2011-03-11 | Add a non-standard option that affects the output TZ only. The input (for | Theo de Raadt | |
parsing) TZ is unaffected. This makes it it easier to convert timestamps from any timezone to any other timezone -- no need for $() gymnastics ok millert | |||
2011-03-11 | Check that date(1) is not passed any extra arguments. | Theo de Raadt | |
ok millert | |||
2010-09-19 | more wacky macro fixing; | Jason McIntyre | |
2010-09-03 | add an EXIT STATUS section for /bin; | Jason McIntyre | |
2010-07-22 | move exit returns blurb out of DIAGNOSTICS; from daniel dickman | Jason McIntyre | |
2010-04-01 | tweak previous; ok deraadt | Jason McIntyre | |
2010-03-31 | Make a -DSMALL version of date(1) for the media | Theo de Raadt | |
2009-10-28 | rcsid[] and sccsid[] and copyright[] are essentially unmaintained (and | Theo de Raadt | |
unmaintainable). these days, people use source. these id's do not provide any benefit, and do hurt the small install media (the 33,000 line diff is essentially mechanical) ok with the idea millert, ok dms | |||
2009-02-08 | bump the posix reference in STANDARDS to IEEE Std 1003.1-2008, with a few | Jason McIntyre | |
updates to follow; | |||
2008-10-01 | give a less confusing error message on bindresvport() failure; ok | Otto Moerbeek | |
matthieu@ millert@ | |||
2007-12-28 | printf field widths are always int, so add a cast to remove | Charles Longeau | |
"warning: field width is not type int" "looks good" otto@ |