View and modify the Linux time zone
- view the current time zone command: “date – R” modify Settings Linux server time zone method
A command: “tzselect” ol>
Method B is limited to RedHat Linux and CentOS
command: “TimeConfig”
Dpkg-reconfigure TzData for Debian
: “dpkg-reconfigure”
- Copy the corresponding time zone file and replace the system time zone file; Or create the link file
cp /usr/share/zoneinfo/
The main
when
area
/
The main time zones /
Primary time zone/secondary time zone /etc/localtime
For example, use Asia/Shanghai (+8) when setting China time zone.
cp /usr/share/zoneinfo/Asia/Shanghai /etc/localtime
Second, the time to view and modify Linux
The
- command to check the time and date “the date” ol>
2. Set a time and date
for example, to set the system date into a command on November 3, 2009
Command: “date-s 11/03/2009”
Set the system time to 5:55:55 p.m
Command: “Date -s 17:55:55”
- to write the current date and time into the BIOS, to avoid failure after restart
command: “hwclock – w ol>”
Note:
date
You can see the current date and time directly without adding arguments
Cal
can be viewed directly without parameter
Reproduced in: https://www.cnblogs.com/Ivan-j2ee/p/3192875.html
Read More:
- How to get the current time in java time string
- Get the current date in Python
- Local date time conversion in java8
- [BUG-mybatis-plus] org.postgresql.util.PSQLException: ERROR: syntax error at or near “current_date“
- ‘Conversion failed when converting date and/or time from character string.DB-Lib error message 241,
- In SQLite database, set the default value for the field as the current time
- The shell gets the current time of the system and formats it
- Shell gets the current time of the system and formats it
- Set the default time to the current value in MySQL
- Vitis: platform out of date, makefile error at compile time; The modified application compiles to undefined reference
- MySQL will delete the data minutes before the current time
- Linux use ls to view the file color is all white solution, and Linux file color introduction
- Common shell (1): shell gets the current time stamp of the system
- 1、 Java 8 date and local date
- Linux view folder size, remaining disk space (DU / DF)
- How to terminate the current program under linux command line?
- Linux (error 1819 (HY000): your password does not satisfy the current policy requirements)
- Error: Node Sass does not yet support your current environment: Linux 64-bit with Unsupported runtim
- Linux7 hardware time occasionally encounter nonsense Powerpath startup error
- The time of the time database displayed by the front end is inconsistent