Ferramentas de Usuário

Ferramentas de Site


en:squeeze:config:clock:date_time

2.4.1 Date, Time and Time Zone

Objective

To adjusts system date and time.

Configuration

Time Zone

Time zone information is stored in the configuration file /etc/timezone an can be checked using the cat command:

root@server:~# cat /etc/timezone
Europe/Lisbon

To adjust the system timezone, use the dpkg-reconfigure tzdata:

root@server:~# dpkg-reconfigure tzdata

Choose the geographical area:

Then the region or city where the system is physically located:

The current default time zone is now:

Current default time zone: 'Europe/Lisbon'
Local time is now:      Wed Oct 27 11:54:26 WEST 2010.
Universal Time is now:  Wed Oct 27 10:54:26 UTC 2010.

Date and Time

date can be used to show the actual system date and time:

root@server:~# date
Wed Oct 27 12:00:57 WEST 2010

date can also be used to quickly adjust system date and time. The syntax is “date MMDDhhmm”:

root@server:~# date 10271201
Wed Oct 27 12:01:00 WEST 2010
en/squeeze/config/clock/date_time.txt · Última modificação em: 2020-08-02 20:10 (edição externa)

Excepto menção em contrário, o conteúdo neste wiki está sob a seguinte licença: CC Attribution-Noncommercial-Share Alike 4.0 International
CC Attribution-Noncommercial-Share Alike 4.0 International Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki