From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from lists.gentoo.org ([140.105.134.102] helo=robin.gentoo.org) by finch.gentoo.org with esmtp (Exim 4.60) (envelope-from ) id 1IS738-00028c-Sa for garchives@archives.gentoo.org; Mon, 03 Sep 2007 08:12:47 +0000 Received: from robin.gentoo.org (localhost [127.0.0.1]) by robin.gentoo.org (8.14.0/8.14.0) with SMTP id l8385Hqd029626; Mon, 3 Sep 2007 08:05:17 GMT Received: from mu-out-0910.google.com (mu-out-0910.google.com [209.85.134.185]) by robin.gentoo.org (8.14.0/8.14.0) with ESMTP id l83807sf023461 for ; Mon, 3 Sep 2007 08:00:07 GMT Received: by mu-out-0910.google.com with SMTP id i10so1930201mue for ; Mon, 03 Sep 2007 01:00:07 -0700 (PDT) DKIM-Signature: a=rsa-sha1; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:references; b=Up8vGIFXzRdBTxwdiarlYskUFHeFUfKUiWv6CvkRpCgQ+QWMPrK7BqqDSdEDo/ZVuB5vIWbiCj0NYgBHF5T6IdDgT1R9GlCvDog4ZBhEhjhktGzjeSS8wlI9lFcaMkFKQZULyH+rfKlva4v8kQbb4c87lMbHaOAehkzexrPa7wY= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:references; b=tHa8Z+yafksRVBj38lbQ1ZS8nfe54Au4P3R/ejBXcUGDbj9L+V1tv/ZjZcpge2xz8uBKFsPjHanTmOGhGZt7lkEFJG0ugjiHWJGN8w237zdQNWdfhEeggduVlIxzx1Uge2aw7awRo9PYYKIjUd1Cmag6fU5WX6xU4ck8ZN7LOlk= Received: by 10.65.225.7 with SMTP id c7mr4399050qbr.1188806405193; Mon, 03 Sep 2007 01:00:05 -0700 (PDT) Received: by 10.65.177.3 with HTTP; Mon, 3 Sep 2007 01:00:05 -0700 (PDT) Message-ID: <68b1e2610709030100g7d385904g6a8128b1e8c63a22@mail.gmail.com> Date: Mon, 3 Sep 2007 03:00:05 -0500 From: "Liviu Andronic" To: gentoo-user@lists.gentoo.org Subject: Re: [gentoo-user] proper proxy syntax to synchronize time via rdate In-Reply-To: <46DAA9F6.7050105@buanzo.com.ar> Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-user@gentoo.org Reply-to: gentoo-user@lists.gentoo.org MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_9925_5991914.1188806405130" References: <68b1e2610709010722l46315975sf2ded6f9c041fb9f@mail.gmail.com> <20070902134433.10554091.rzilka@gvid.cz> <46DAA9F6.7050105@buanzo.com.ar> X-Archives-Salt: b98b8f65-e59b-482c-992e-9722ec9cf382 X-Archives-Hash: 10193893f54c8777d1e2bac1e65aee7c ------=_Part_9925_5991914.1188806405130 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Content-Disposition: inline Thank you both for the quick replies. The answer to my problem is htpdate. I was searching for such an utility for quite some time. I still have one problem, though. When installing Gentoo, I probably chose the USA as my location. However, I'm located in CET (that is, GMT+1). From htpdate, I receive the following output: localhost liviu # /usr/sbin/htpdate -dq -P PROXY_ADDRESS:PROXY_PORT www.linux.org www.opera.com pool.ntp.org www.linux.org 03 Sep 2007 07:32:19 GMT (0.477) => -24738 www.linux.org 03 Sep 2007 07:32:20 GMT (0.325) => -24738 www.opera.com 03 Sep 2007 07:32:21 GMT (0.119) => -24738 www.opera.com 03 Sep 2007 07:32:22 GMT (0.117) => -24738 pool.ntp.org 03 Sep 2007 07:32:22 GMT (0.134) => -24738 pool.ntp.org 03 Sep 2007 07:32:23 GMT (0.072) => -24738 #: 3, mean: -24738, average: -24738.000 Timezone: GMT-5 (EST,EST) Offset -24738.000 seconds For some reason, it persistently considers my timezone EST (Eastern Standard Time, GMT-5). I reconsidered Gentoo's localization guide and now /etc/cond.d/clock contains these two options: localhost liviu # nano /etc/conf.d/clock [..] CLOCK="local" TIMEZONE="Europe/Berlin" [..] I also added TZ="Europe/Berlin" to both user and root ~/.bash_profile. And still, htpdate wants to synchronize my clock to EST. Any ideas on how to make htpdate think that I'm actually in the EU instead of the US? There was no info on the way it treats timezones, neither in the man page, nor on their site. I did find in their changelog: 0.6.1 ----- - Code clean up, use global variable 'timezone'. However, running it under new env gives me yet again the time synced to EST: localhost liviu # timezone="GMT+1" OR TIMEZONE="CET" htpdate -dq -P PROXY_ADDRESS:PROXY_PORT www.linux.org www.opera.com pool.ntp.org [..] Timezone: GMT-5 (EST,EST) Offset -24738.000 seconds Regards, Liviu On 9/2/07, Arturo 'Buanzo' Busleiman wrote: > > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA512 > > * net-misc/htpdate > Available versions: ~0.9.2 0.9.3 1.0.0 > Homepage: http://www.clevervest.com/htp/ > Description: Synchronize local workstation with time offered > by remote webservers > > > -- Liviu ------=_Part_9925_5991914.1188806405130 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: 7bit Content-Disposition: inline Thank you both for the quick replies.

The answer to my problem is htpdate. I was searching for such an utility for quite some time. I still have one problem, though. When installing Gentoo, I probably chose the USA as my location. However, I'm located in CET (that is, GMT+1). From htpdate, I receive the following output:

localhost liviu # /usr/sbin/htpdate -dq -P PROXY_ADDRESS:PROXY_PORT www.linux.org www.opera.com pool.ntp.org
www.linux.org 03 Sep 2007 07:32:19 GMT (0.477) => -24738
www.linux.org 03 Sep 2007 07:32:20 GMT (0.325) => -24738
www.opera.com 03 Sep 2007 07:32:21 GMT (0.119) => -24738
www.opera.com 03 Sep 2007 07:32:22 GMT (0.117) => -24738
pool.ntp.org 03 Sep 2007 07:32:22 GMT (0.134) => -24738
pool.ntp.org 03 Sep 2007 07:32:23 GMT (0.072) => -24738
#: 3, mean: -24738, average: -24738.000
Timezone: GMT-5 (EST,EST)
Offset -24738.000 seconds

For some reason, it persistently considers my timezone EST (Eastern Standard Time, GMT-5). I reconsidered Gentoo's localization guide and now /etc/cond.d/clock contains these two options:

localhost liviu # nano /etc/conf.d/clock
[..]
CLOCK="local"
TIMEZONE="Europe/Berlin"
[..]

I also added TZ="Europe/Berlin" to both user and root ~/.bash_profile. And still, htpdate wants to synchronize my clock to EST. 

Any ideas on how to make htpdate think that I'm actually in the EU instead of the US? There was no info on the way it treats timezones, neither in the man page, nor on their site. I did find in their changelog: 0.6.1 ----- - Code clean up, use global variable 'timezone'. However, running it under new env gives me yet again the time synced to EST:

localhost liviu # timezone="GMT+1" OR TIMEZONE="CET" htpdate -dq -P PROXY_ADDRESS:PROXY_PORT www.linux.org www.opera.com pool.ntp.org
[..]
Timezone: GMT-5 (EST,EST)
Offset -24738.000 seconds


Regards,
Liviu

On 9/2/07, Arturo 'Buanzo' Busleiman <buanzo@buanzo.com.ar> wrote:
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512

* net-misc/htpdate
     Available versions:  ~0.9.2 0.9.3 1.0.0
     Homepage:            http://www.clevervest.com/htp/
     Description:         Synchronize local workstation with time offered by remote webservers





--
Liviu ------=_Part_9925_5991914.1188806405130-- -- gentoo-user@gentoo.org mailing list