GNU RCS 5.9.1: Date option

Next: , Previous: , Up: Common elements   [Contents][Index]


2.1.2 Date option

Some commands accept an option of the form ‘-ddate’ to specify a date, an absolute point in time (to second resolution), expressed in a date format. These also accept ‘-zzone’ to specify the timezone. The special value ‘LT’ stands for the local time zone. RCS recognizes many date formats and time zones. For example, the following dates are equivalent if local time is January 11, 1990, 8pm Pacific Standard Time, eight hours west of Coordinated Universal Time (UTC):

8:00 pm lt
4:00 AM, Jan. 12, 1990           default is UTC
1990-01-12 04:00:00+00           ISO 8601 (UTC)
1990-01-11 20:00:00-08           ISO 8601 (local time)
1990/01/12 04:00:00              traditional RCS format
Thu Jan 11 20:00:00 1990 LT      output of ctime(3) + LT
Thu Jan 11 20:00:00 PST 1990     output of date(1)
Fri Jan 12 04:00:00 GMT 1990
Thu, 11 Jan 1990 20:00:00 -0800  Internet RFC 822
12-January-1990, 04:00 WET

Most fields in the date and time can be defaulted. The default time zone is normally UTC, but this can be overridden by the -z option. The other defaults are determined in the order year, month, day, hour, minute, and second (most to least significant). At least one of these fields must be provided. For omitted fields that are of higher significance than the highest provided field, the time zone’s current values are assumed. For all other omitted fields, the lowest possible values are assumed. For example, without -z, the date ‘20, 10:30’ defaults to ‘10:30:00 UTC’ of the 20th of the UTC time zone’s current month and year. Note that for the shell, the date/time must be quoted if it contains spaces.

RCS also accepts some other formats which specify only the date portion (omitting the time portion):

YYYY-DDD

DDD is the day of year, 1-366.

YYYY-wWW-D

WW is the ISO week number, 0-53 (actually, ISO week numbers are 1-53; week 0 is a GNU RCS extension); and D is the ISO day number, 1-7 (Monday through Sunday).


Next: , Previous: , Up: Common elements   [Contents][Index]


177 visits (2 today, 7 this week, 26 this month, 177 this year)
Uptime: 22:07:17 up 4 days, 3:50, 3 users, load average: 0.00, 0.00, 0.00
3.145.58.141 GET from server z.larrymurakami.com

Saturday, December 21, 2024 @ 10:07:17 PM
z.ServerAdmin@lam1.us