FreeBSD - Tutorials, Security
Home   Archives   Sitemap   About   Contact

Set the timezone in FreeBSD OS - How To

Home NEW! Unix Forum News 100 Tips and Tricks Website Development Server Operating Systems Databases
 Ivorde.ROarrow Server Operating Systems arrowAdministration GuidesarrowSet the timezone in FreeBSD OS - How To 

Article Sections

    Hello, Guest !
User name:
Password:
 
Google

 SSD VPS Hosting - Vpsie.com
 Mo.nitor.me
 Ivorde forum
 FreeBSD Tutorials
 Linux LVM Commands
 Free Shell Accounts
 FreeBSD Project
 FreeBSD Handbook
 Advanced Bash-Scripting Guide
 The OpenBSD Project
 Distrowatch
 FreeBSD Handbook


Apache Webserver Home Page

Posted on: 19 Mar 2008
Author: mandrei
Section: Server Operating Systems | Administration Guides
Views: 1574
Comments: 0 (Add)

Set the timezone in FreeBSD OS - How To
Set the timezone in FreeBSD OS - How To, tzsetup, adjkerntz, timezone, time zone

 



How To set the timezone in FreeBSD OS

There are at least three methods of setting the timezone in FreeBSD:

1. using /usr/sbin/sysinstall (Configure -> Time Zone)

2. using tzsetup (sysinstall fastpath)

3. Copying from /usr/share/zoneinfo/Etc or /usr/share/zoneinfo/Europe/ the timezone that coresponds to your city/GMT setting to /etc/localtime.

Once you've set the timezone in your FreeBSD server, run the command: adjkerntz -a (adjut kernel timezone).

Below you can find a snap from man adjkerntz:

ADJKERNTZ(8) FreeBSD System Manager's Manual ADJKERNTZ(8)

NAME
adjkerntz -- adjust local time CMOS clock to reflect time zone changes
and keep current timezone offset for the kernel

SYNOPSIS
adjkerntz -i
adjkerntz -a [-s]

DESCRIPTION
The adjkerntz utility maintains the proper relationship between the ker-
nel clock, which is always set to UTC, and the CMOS clock, which may be
set to local time. The adjkerntz utility also informs the kernel about
machine timezone shifts to maintain proper timestamps for local time file
systems such as the MS-DOS file system. The main purpose of this thing
is not general fixing of initially broken MS-DOS file timestamp idea but
keeping the same timestamps between FreeBSD MS-DOS file system and MS-DOS
operating system installed on the same machine. If the file
/etc/wall_cmos_clock exists, it means that CMOS clock keeps local time
(MS-DOS and MS-Windows compatible mode). If that file does not exist, it
means that the CMOS clock keeps UTC time. The adjkerntz utility passes
this state to the machdep.wall_cmos_clock kernel variable.

Adjustments may be needed at system startup and shutdown, and whenever a
time zone change occurs. To handle these different situations, adjkerntz
is invoked in two ways:
-a [-s]
This form is used to update the local time CMOS clock and kernel
machdep.adjkerntz variable when time zone changes occur, e.g., when
entering or leaving daylight savings time. The adjkerntz utility
uses the kernel clock's UTC time, the previously stored time zone
offset, and the changed time zone rule to calculate a new time zone
offset. It stores the new offset into the machdep.adjkerntz kernel
variable, and updates the wall CMOS clock to the new local time.
If 'adjkerntz -a' was started at a nonexistent time (during a time-
zone change), it exits with a warning diagnostic unless the -s
option was used, in which case adjkerntz sleeps 30 minutes and
tries again.

This form should be invoked from root's crontab(5) every half hour
between midnight and 5am, when most modern time zone changes occur.
Warning: do not use the -s option in a crontab(5) command line, or
multiple 'adjkerntz -a' instances could conflict with each other.

 

 

Bookmarks: Echo "Set the timezone in FreeBSD OS - How To" around:
del.icio.usdiggFurlYahooMyWebGoogleBookmarksFaceBookTechnocratti
-------------------advertising-----------------

Other articles in Server Operating Systems / Administration Guides




Contact webmaster regarding this article
Register or Login to post your article
Hello, Guest ! You can Login or Register to www.ivorde.ro!

 Post comment:

Name:
Title:
Comment:
Please type the word you see in the image (anti-spam verification). Refresh the page if you don't understand the word.
Allowed HTML Tags for comments:<p><strong><em><u><h1><h2><h3><h4><h5><h6><img><li>
<ol><ul><span><div><br><ins><del>

0 comment(s) to Set the timezone in FreeBSD OS - How To:

   Latest topics on the forum:
 
   Most viewed articles:
How to copy a mysql database using mysqldump - 9376 views
How to change a user's password in AIX with the output from ECHO command - 8635 views
FreeBSD: Add/remove an additional IP alias - 5609 views
Qmail relay to smarthost: How to route all mail to a smarthost - 3929 views
Print queues in AIX 5L - How to list print queues in AIX - 2884 views

   Latest 10 articles:
Qmail relay to smarthost: How to route all mail to a smarthost - 03 Feb 2009
EXIM 4 relay to smarthost: How to route all mail except local domain - 03 Feb 2009
Windows XP: print LISTEN ports and network connections using netstat - 30 Jan 2009
How to cut out first last n characters from each file name, from a filelist - 04 Nov 2008
Mozilla Firefox3 is now released - 18 Jun 2008
How to switch lower case to upper case and upper case to lower case in a string - 17 Jun 2008
How to rename files/directories to uppercase/lowercase character names - 17 Jun 2008
How to convert lower case to upper case letters in a shell script/command - 17 Jun 2008
Unix,Linux,FreeBSD - How to rename a list of files, replacing spaces inside their names - 12 Jun 2008
How to change a user's password in AIX with the output from ECHO command - 21 May 2008


Archives
» 2007  |  June  |  October  |  November  |  December
» 2008  |  January  |  February  |  March  |  April  |  May  |  June  |  November
» 2009  |  January  |  February



Home | Archives | Sitemap | About | Contact

Designed and developed by Andrei Manescu. Optimized for Mozilla Firefox.  
Copyright 2007 Andrei Manescu
All trademarks and copyrights on this page are owned by their respective owners. Comments are owned by those who posted them.
Valid W3 Document Valid XHTML 1.0 Transitional Valid CSS! The FreeBSD Project Viewable With Any Browser