Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

[gentoo-user] time issue

20 views
Skip to first unread message

András Csányi

unread,
May 30, 2011, 4:20:02 AM5/30/11
to
Hi All,

I have a little problem regarding time. After every boot I have to
setup my clock because about my machine the current time is +2 hour
more. To be honest, this is a little bit annoying.
What I did:

- According to install guide I have copied the
/usr/share/zoneinfo/Europe/Budapest to /etc/localtime
- According to localization guide [1] I have to set up the current
timezone in the /etc/conf.d/clock file but this file is missing. I
have checked it the original stage-3 pack from Hungarian mirror and I
couldn't find there as well. I think this file is removed.

So my question is that, what should I do to have the current time
automatically (I'm in Hungary/Budapest)? Should I make a new clock
file?

[1] - http://www.gentoo.org/doc/en/guide-localization.xml

Thanks for any help in advance!

András

--
- -
--  Csanyi Andras (Sayusi Ando)  -- http://sayusi.hu --
http://facebook.com/andras.csanyi
--  ""Trust in God and keep your gunpowder dry!" - Cromwell

Pandu Poluan

unread,
May 30, 2011, 5:00:02 AM5/30/11
to
IIRC, starting from baselayout-2 the timezone is in /etc/timezone

Just one line: Region/City

Rgds,


--
--
Pandu E Poluan - IT Optimizer
My website: http://pandu.poluan.info/

Florian Philipp

unread,
May 30, 2011, 5:10:02 AM5/30/11
to
Am 30.05.2011 10:15, schrieb András Csányi:
> Hi All,
>
> I have a little problem regarding time. After every boot I have to
> setup my clock because about my machine the current time is +2 hour
> more. To be honest, this is a little bit annoying.
> What I did:
>
> - According to install guide I have copied the
> /usr/share/zoneinfo/Europe/Budapest to /etc/localtime
> - According to localization guide [1] I have to set up the current
> timezone in the /etc/conf.d/clock file but this file is missing. I
> have checked it the original stage-3 pack from Hungarian mirror and I
> couldn't find there as well. I think this file is removed.
>
> So my question is that, what should I do to have the current time
> automatically (I'm in Hungary/Budapest)? Should I make a new clock
> file?
>
> [1] - http://www.gentoo.org/doc/en/guide-localization.xml
>
> Thanks for any help in advance!
>
> András
>

First question: Are you dual-booting some other operating system?
Windows sets the hardware clock to local time, Linux expects it to be
UTC, by default. You can change this setting in /etc/conf.d/hwclock

In this file, you can also specify to set the hardware clock to whatever
the software clock tells. That might help you to restore the correct
time at boot.

The localization guide seems to be in a poor state. Copying the zoneinfo
file from /usr/share... to /etc/localtime is not the best way to do it
because then you miss updates. It is better to create a symlink between
the two. Also, instead of setting the timezone in /etc/conf.d/clock, you
do it in /etc/timezone nowadays (change introduced in baselayout-2 if
I'm not mistaken).

`echo Hungary/Budapest > /etc/timezone`
will do the trick.

Hope this helps,
Florian Philipp

signature.asc

Henry Gebhardt

unread,
May 30, 2011, 5:10:03 AM5/30/11
to
On Mon, May 30, 2011 at 10:15:59AM +0200, András Csányi wrote:
>
> So my question is that, what should I do to have the current time
> automatically (I'm in Hungary/Budapest)? Should I make a new clock
> file?

You should probably customize /etc/conf.d/hwclock, search for "Clock" in
http://www.gentoo.org/doc/en/openrc-migration.xml.

>
> [1] - http://www.gentoo.org/doc/en/guide-localization.xml

That looks like a bug in the documentation.


H

Florian Philipp

unread,
May 30, 2011, 5:20:02 AM5/30/11
to

I've just reported it in the tracker bug for documentation changes due
to the OpenRC migration.

Regards,
Florian Philipp

signature.asc

Mick

unread,
May 30, 2011, 5:20:02 AM5/30/11
to
On Monday 30 May 2011 09:15:59 András Csányi wrote:
> Hi All,
>
> I have a little problem regarding time. After every boot I have to
> setup my clock because about my machine the current time is +2 hour
> more. To be honest, this is a little bit annoying.
> What I did:
>
> - According to install guide I have copied the
> /usr/share/zoneinfo/Europe/Budapest to /etc/localtime
> - According to localization guide [1] I have to set up the current
> timezone in the /etc/conf.d/clock file but this file is missing. I
> have checked it the original stage-3 pack from Hungarian mirror and I
> couldn't find there as well. I think this file is removed.
>
> So my question is that, what should I do to have the current time
> automatically (I'm in Hungary/Budapest)? Should I make a new clock
> file?
>
> [1] - http://www.gentoo.org/doc/en/guide-localization.xml
>
> Thanks for any help in advance!
>
> András

Assuming that you have moved to openrc and running Linux not FreeBSD, you
should have a file /etc/conf.d/hwclock. Therefore you would not need to
create the /etc/conf.d/clock file:

http://www.gentoo.org/doc/en/openrc-migration.xml

Read the section under Clock, which says that you should set up your timezone
in /etc/timezone. If it hasn't been created in your system already, then add
it yourself with this line in it:

Europe/Budapest

HTH.
--
Regards,
Mick

signature.asc

Henry Gebhardt

unread,
May 30, 2011, 5:40:03 AM5/30/11
to
On Mon, May 30, 2011 at 10:57:51AM +0200, Florian Philipp wrote:
> Am 30.05.2011 10:15, schrieb András Csányi:
>
> The localization guide seems to be in a poor state. Copying the zoneinfo
> file from /usr/share... to /etc/localtime is not the best way to do it
> because then you miss updates. It is better to create a symlink between
> the two.

Copying is just fine. The timezone-data ebuild will update
/etc/localtime for you on the next update, and replace the symlink if
you have one there. The reason, IIRC, being that /usr might not yet be
mounted during early boot.


H

Neil Bothwick

unread,
May 30, 2011, 7:10:02 AM5/30/11
to
On Mon, 30 May 2011 10:57:51 +0200, Florian Philipp wrote:

> The localization guide seems to be in a poor state. Copying the zoneinfo
> file from /usr/share... to /etc/localtime is not the best way to do it
> because then you miss updates. It is better to create a symlink between
> the two.

Which will break if /usr is on a separate filesystem.

> Also, instead of setting the timezone in /etc/conf.d/clock, you
> do it in /etc/timezone nowadays (change introduced in baselayout-2 if
> I'm not mistaken).

Setting it in /etc/timezone also takes care of the updates situation,
because the timezone-data ebuild automatically copies the correct file
to /etc/.


--
Neil Bothwick

Linux users do it without paying a Bill

signature.asc

András Csányi

unread,
May 31, 2011, 12:20:02 PM5/31/11
to
On 30 May 2011 10:15, András Csányi <sayus...@gmail.com> wrote:
> Hi All,
>
> I have a little problem regarding time.  After every boot I have to
> setup my clock because about my machine the current time is +2 hour
> more. To be honest, this is a little bit annoying.
> What I did:
>
> - According to install guide I have copied the
> /usr/share/zoneinfo/Europe/Budapest to /etc/localtime
> - According to localization guide [1] I have to set up the current
> timezone in the /etc/conf.d/clock file but this file is missing. I
> have checked it the original stage-3 pack from Hungarian mirror and I
> couldn't find there as well. I think this file is removed.
>
> So my question is that, what should I do to have the current time
> automatically (I'm in Hungary/Budapest)? Should I make a new clock
> file?
>
> [1] - http://www.gentoo.org/doc/en/guide-localization.xml
>
> Thanks for any help in advance!

Thank you for your help! This problem is resolved.
For the record, I edited the hwclock file, I created the /etc/timezone
file and I symlinked the proper file from zoneinfo directory to
/etc/localtime, and a ntp daemon was installed, as well.

It looks like everything is working fine!

0 new messages