Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 30 Sep 2007 16:16:26 -0700
From:      jekillen <jekillen@prodigy.net>
To:        "Brian A. Seklecki" <lavalamp@spiritual-machines.org>
Cc:        FreeBSD Mailing List <freebsd-questions@freebsd.org>
Subject:   Re: using the date command
Message-ID:  <aac92f114b1db2ad03f3411516f6524d@prodigy.net>
In-Reply-To: <1191124332.5997.21.camel@new-host>
References:  <5e433b6210a52ae0220ae0a20d0353e1@prodigy.net> <1191124332.5997.21.camel@new-host>

next in thread | previous in thread | raw e-mail | index | archive | help

On Sep 29, 2007, at 8:52 PM, Brian A. Seklecki wrote:

> To set time:
>
> $ sudo /usr/sbin/ntpdate pool.ntp.org
> 29 Sep 23:48:31 ntpdate[9404]: adjust time server 66.250.45.2 offset
> 0.001289 sec
>
> To date info about your timezone settings:
>
> $ zdump /etc/localtime
> /etc/localtime  Sat Sep 29 23:49:19 2007 EDT
>
> Options:
>
> $ ls /usr/shaoneinfo/ | egrep -v "^d"
> total 78
> -rw-r--r--   1 root  wheel    755 Aug 22 11:11 CET
> -rw-r--r--   1 root  wheel    837 Aug 22 11:11 CST6CDT
> -rw-r--r--   1 root  wheel    679 Aug 22 11:11 EET
> -rw-r--r--   1 root  wheel     56 Aug 22 11:11 EST
> -rw-r--r--   1 root  wheel    837 Aug 22 11:11 EST5EDT
> [...]
>
> To set timezone:
>
> $ ln -s /share/zoneinfo/$WHATEVER /etc/localtime
>
> For you probably PST8PDT.
>
> For your best NTP experience, use OpenNTP from
> ports: /usr/ports/net/openntpd/
>
> ~BAS
Thanks for the info, very helpful;
Jeff K
>
>
> On Sat, 2007-09-29 at 20:33 -0700, jekillen wrote:
>> Hello all;
>> I have built 4 machines and installed FreeBSD 6.0 in one and 6.2
>> in the other three. They are all using the wrong date and time.
>> The last one (v6.2 on ecs mb with AMD64) is the worst. It is telling
>> me today is Jan 3 2003 PST (I am on the west coast and it is still 
>> PDT).
>> These machines are all web servers. So up until now this has not been
>> a big issue but a configuration of software is complaining that the
>> files
>> it creates have an older date than the files in the software bundle,
>> it is time to do something about it. So I am looking at man date and 
>> as
>> I interpret the instructions #date ccyymmddHHMM.ss  (20079282027.00 or
>> 200709282027.00 for instance) is supposed to set the
>> clock to the current date. But when I run a command with the
>> current date and time in the above format I get the complaint that
>> the format string is wrong.
>> Can anyone be kind enough to give me a quick tutorial on this?
>> I will be looking seriously into using NTP, but for now I need to
>> get the date straight. I have entries in apache error log gener
>> ated by php scripts that are supposed to use its date command.
>> Thanks in advance for assistance.
>> Jeff K
>>
>> _______________________________________________
>> freebsd-questions@freebsd.org mailing list
>> http://lists.freebsd.org/mailman/listinfo/freebsd-questions
>> To unsubscribe, send any mail to 
>> "freebsd-questions-unsubscribe@freebsd.org"
>>
>>
>>
>>
>>
>>
>




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?aac92f114b1db2ad03f3411516f6524d>