If you want to display the date and time on your Mac Terminal, you can make use of the date command.
Example:% date
Thu Sep 6 11:56:15 EST 2023
If you wish to change the date and time of your Mac device, you can make use of the same date command with elevated privileges as follows,
Change Date and Time
% sudo date 090712002023.30
Password:
Thu Sep 7 12:00:30 EST 2023
The date/time format string: mmddHHMMyyyy.ss
| Format | Description | Valid Values |
|---|---|---|
| mm | Month (01-12) | 01 to 12 |
| dd | Day (01-31) | 01 to 31 |
| HH | Hour (00-23) | 00 to 23 |
| MM | Minute (00-59) | 00 to 59 |
| yyyy | Year (e.g., 2021) | Any valid year |
| ss | Second (00-61) | 00 to 61 (allowing for leap seconds) |

Provide Feedback For This Article
We take your feedback seriously and use it to improve our content. Thank you for helping us serve you better!
😊 Thanks for your time, your feedback has been registered!
Comments & Discussion
Facing issues? Have questions? Post them here! We're happy to help!