Differences between revisions 1 and 3 (spanning 2 versions)
Revision 1 as of 2023-06-29 17:12:47
Size: 929
Comment:
Revision 3 as of 2023-06-29 17:14:34
Size: 986
Comment:
Deletions are marked like this. Additions are marked like this.
Line 17: Line 17:
sudo date 0101011230 date 0101011230
Line 42: Line 42:
Consider using the interactive '''`tzsetup(8)`''' utility.

BSD Clock

On BSD, the clock generally uses UTC time with a timezone offset in software, as opposed to local time.


Date and Time

Use date(1) as the root user to set the current date and time.

# January 1st, 2001 at 12:30
date 0101011230

The CMOS clock is automatically updated to match the system clock.


Timezone

The configured timezone is set in /etc/localtime. By standard convention, this should be a symbolic link to a pre-prepared file, typically under /usr/share/zoneinfo.

To check the current configuration, try:

realpath /etc/localtime

To change the configuration, try:

ln -sf /usr/share/zoneinfo/America/New_York /etc/localtime

Consider using the interactive tzsetup(8) utility.

Some utilities will also respect a TZ environment variable.

export TZ=America/New_York
date


CategoryRicottone

BSD/Clock (last edited 2023-06-29 17:14:34 by DominicRicottone)