mirror of
https://git.hardenedbsd.org/hardenedbsd/HardenedBSD.git
synced 2024-11-15 23:05:49 +01:00
Correct confusion and differentiate appropriately between GMT and UTC when
date is launched with the "u" argument. It now operates in the documented manner. Fix typo in date man page. Submitted by: David McNett <nugget@slacker.com>
This commit is contained in:
parent
3ec91ea962
commit
d5dc63cc0a
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=60718
@ -130,7 +130,7 @@ by future calls to
|
||||
.Xr gettimeofday 2 .
|
||||
.It Fl u
|
||||
Display or set the date in
|
||||
.Tn UCT
|
||||
.Tn UTC
|
||||
.Pq universal
|
||||
time.
|
||||
.It Fl v
|
||||
|
@ -118,15 +118,15 @@ main(argc, argv)
|
||||
rflag = 1;
|
||||
tval = atol(optarg);
|
||||
break;
|
||||
case 't': /* minutes west of GMT */
|
||||
case 't': /* minutes west of UTC */
|
||||
/* error check; don't allow "PST" */
|
||||
tz.tz_minuteswest = strtol(optarg, &endptr, 10);
|
||||
if (endptr == optarg || *endptr != '\0')
|
||||
usage();
|
||||
set_timezone = 1;
|
||||
break;
|
||||
case 'u': /* do everything in GMT */
|
||||
(void)setenv("TZ", "GMT0", 1);
|
||||
case 'u': /* do everything in UTC */
|
||||
(void)setenv("TZ", "UTC0", 1);
|
||||
break;
|
||||
case 'v':
|
||||
v = vary_append(v, optarg);
|
||||
|
Loading…
Reference in New Issue
Block a user