How do I only change the system date, not time?
Issue
When date command is executed with -s option to change the system date, the time is also changed to 00:00:00. How do I only change the system date, not time?
# date
Mon Jun 19 13:31:09 KST 2023
# date -s "2023-06-26"
Mon Jun 26 00:00:00 KST 2023
Environment
- Red Hat Enterprise Linux 6, 7, 8, and 9
Subscriber exclusive content
A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.