linux

Setting your timezone (gnu/Linux) /openbsd

Setting your timezone

The timezone under Linux is set by a symbolic link from /etc/localtime to a file in the /usr/share/zoneinfo directory that corresponds with what timezone you are in. For example, since I’m in Kuala Lumpur, /etc/localtime is a symlink to /usr/share/zoneinfo/Asia/Kuala_Lumpur. To set this link, type:

ln -sf ../usr/share/zoneinfo/your/zone /etc/localtime

Replace your/zone with something like Asia/Kuala_Lumpur or Asia/Pontianak etc etc. Have a look in the directories under /usr/share/zoneinfo to see what timezones are available.

p/s: if u dont have any issue with timezone juzt type:

$sudo ntpdate ntp.jaring.my
19 Oct 12:12:58 ntpdate[6505]: adjust time server 61.6.32.61 offset 0.027651 sec

$date

Mon Oct 19 12:13:42 MYT 2009

..if correct, its done

————————————————————————————————–

For OpenBSD :

What follows is setting up ntpd as a client

  • step 1 – Create the file /etc/rc.conf.local if it doesn’t exist
  • step 2 – Edit rc.conf.local so ntpd will run at boot-up
  • step 3 – Setting the NTP server that will be used to check time

$ touch /etc/rc.conf.local

$ echo ntpd_flags=\”-s\” >> /etc/rc.conf.local

                         (so ntpd runs at startup)

Edit the /etc/ntpd.conf file, adding the time server to be used

$ sudo nano /etc/ntpd.conf

in configuration file, edit/add ntp server, comment out others unnecessary

# sync to a single server
server ntp.jaring.my

after that, check

$ grep ntpd /var/log/daemon

if nothing happens, try restarting service/host. done

By salawank on October 19, 2009 | Uncategorized | A comment?
Tags: , ,

10 visitors online now
10 guests, 0 members
Max visitors today: 11 at 11:25 am GMT-8
This month: 11 at 09-09-2010 11:25 am GMT-8
This year: 21 at 03-24-2010 06:49 pm GMT-8
All time: 43 at 10-20-2009 08:17 am GMT-8

salawank is Digg proof thanks to caching by WP Super Cache