Displays or changes the date, time or time zone.
chdate [ mmddHHMM [YYyy | yy] ] [-timezone TZ]
chdate [-year YYyy] [-month mm] [-day dd] [-hour HH] [-minute MM] [-timezone TZ]
Displays or changes the system date, time, or time zone. Changes made to the time zone will not take effect until the user logs out. For the time zone to take effect for the entire system, the system must be rebooted. All flags are optional, and the current system time information will be used if a flag was unspecified.
If no flags or arguments are specified, the chdate command displays the current date and time.
The mmddHHMM [YYyy | yy] parameters correspond to month, day, hour, minute, and optional 4 or 2 digit year.
| Flag name | Description |
|---|---|
| -year | Sets the year to YYyy. |
| -month | Sets the month to mm. |
| -day | Sets the day to dd. |
| -hour | Sets the hour to HH in 24-hour format. |
| -minute | Sets the minute to MM. |
| -timezone | Sets the time zone (for example, CST6CDT). |
chdate
chdate -day 12 -month 10 -year 2004 -hour 16 -minute 30
or chdate 101216302004