SliTaz SliTaz Forum

You are not logged in.

#1 2014-09-27 14:06:44

allen
Member
Registered: 2014-06-22
Posts: 36

SliTaz 5.0.cooking.base: ntpdate

While I have read all posts concerning setting the time as well as topics about the timezone, my puzzler is puzzled about setting the timezone on cooking.base CLI.

Reader Digest version...

I ran the command [c]ntpdate pool.ntp.org[/c] to correct my system time. This brought about a time change difference of 5 hours my local time (USA-Chicago-CST) confirmed running the command [c]date[/c]. I created /etc/TZ with UTC-5 per instructions on one post with no change. I have read I need to install [c]glibc-locale 2.14.1[/c] but I find it crazy I'll have to install 2000+ files just to be able to specify the correct timezone for my small, compact SliTaz base installation.

Are there alternatives to my being able to use [c]ntpdate[/c] to correct my system time and adjust for my timezone without having to install [c]glibc-locale 2.14.1[/c]? If not I guess my alternative is to let the bios supply the time.. which of course will drift over time (pun intended).

Thank you,

Allen

Offline

#2 2014-09-27 16:01:31

mojo
Administrator
Registered: 2011-03-29
Posts: 2,174

Re: SliTaz 5.0.cooking.base: ntpdate

Individual files from cooking packages can be downloaded for manual installation to proper path.

cook.slitaz.org

Package: glibc-locale

Click the files link

Click the file name to download

http://cook.slitaz.org/cooker.cgi?download=../wok/glibc-locale/taz/glibc-locale-2.14.1/fs/usr/share/zoneinfo/America/Chicago

[c]cp Chicago /usr/share/zoneinfo/America[/c]

[c]echo America_Chicago > /etc/TZ[/c]

reboot

Alternative:

Use an ftp capable browser (not midori) or client, go to ftp.cook.org <pkg name>/taz folder to download individual files

Offline

#3 2014-09-29 08:26:22

kultex
Administrator
Registered: 2011-03-28
Posts: 1,175

Re: SliTaz 5.0.cooking.base: ntpdate

I have done it on one of my servers, but I am not home and I dont remember well...

try in /etc/local.sh something like:

TZ='UTC-5'; export TZ

and the run ntpdate

Offline

#4 2014-09-29 22:27:20

lexeii
Administrator
Registered: 2012-03-21
Posts: 1,853

Re: SliTaz 5.0.cooking.base: ntpdate

Hi allen, mojo and kultex!

First. The newest timezone files you'll find in the latest tzdata package (view files). Many files from this package has moved to the locale-** packages, and here you'll find the rest. Use ftp://cook.slitaz.org/tzdata to see all tzdata files.

Download America/Chicago file using this link: http://cook.slitaz.org/cooker.cgi?download=../wok/tzdata/taz/tzdata-2014h/fs/usr/share/zoneinfo/posix/America/Chicago

Make folder (as root user):

[c]mkdir -p /usr/share/zoneinfo/America[/c]

Copy your Chicago file to the folder you create: /usr/share/zoneinfo/America

Now you have timezone definition file: /usr/share/zoneinfo/America/Chicago

Then put timezone to the system file (mojo's little mistake — not underscore but slash):

[c]echo "America/Chicago" > /etc/TZ[/c]

And put timezone to environment variable (kultex's little mistake — there's no UTC-5 timezone file):

[c]export TZ="America/Chicago"[/c]

Now try ntpdate.

After reboot check that your TZ environment variable stores your value:

[c]printenv TZ
America/Chicago[/c]

Offline

#5 2014-09-29 23:42:00

allen
Member
Registered: 2014-06-22
Posts: 36

Re: SliTaz 5.0.cooking.base: ntpdate

I apologize for a delayed reply to mojo's post...

@mojo

I did notice I could dload individual timezone files but was overwhelmed by so many and how to install. I did as you suggested, dloading the Chicago timezone but did find the underscore a typo when only America showed in the timezone after running the command [c]date[/c]. Replacing with [c]America/Chicago[/c] worked perfect after rebooting and running [c]ntpdate[/c]. Thank you!

@kultex

Yes I did find [c]UTC-[/c] [c]or +[/c] a number did change the timezone. I typo'd my first attempt, reason while it didn't work. Damn typo's. Thank you!

@Aleksej

I'm going to browse your links having mentioned newer timezone files. I am curious the difference it can make. Thank you!

Let me know if any of you are ever in the Chicago area. I'll buy you a couple beers. smile

Thanks to you all!

Allen

Offline

#6 2014-09-29 23:56:24

lexeii
Administrator
Registered: 2012-03-21
Posts: 1,853

Re: SliTaz 5.0.cooking.base: ntpdate

Hi, allen!

No. I'm from Ukraine (and my TZ is Europe/Kiev, by the way).

If you curious about difference between tzdata versions, please read tzdata mailing list: http://mm.icann.org/pipermail/tz-announce/

I want you to know that current tzdata version is 2014h. This "h" means eighth version in this year. I don't know version of tzdata included in our glibc (→ glibc-locale) package, but it dated as October 7, 2011. Everything is changing...

Offline

#7 2014-09-30 00:06:17

allen
Member
Registered: 2014-06-22
Posts: 36

Re: SliTaz 5.0.cooking.base: ntpdate

@Aleksej

Thank you for the link on the tzdata versions. In my quick look through I see what you are referring to. Interesting how all the information is collected toward updating SliTaz. Even more so what some might consider trivial...

Changes affecting past time stamps

     America/Jamaica's 1974 spring-forward transition was Jan. 6, not

Apr. 28.

     Shanks says Asia/Novokuznetsk switched from LMT (not "NMT") on

1924-05-01,

     not 1920-01-06.  The old entry was based on a misinterpretation of

Shanks.

Thank you for all you do!

Offline

#8 2014-09-30 01:07:34

lexeii
Administrator
Registered: 2012-03-21
Posts: 1,853

Re: SliTaz 5.0.cooking.base: ntpdate

allen,

In your case there is no differences for America/Chicago, both files 3543 Bytes and have same md5sum.

Something different for my country. Text from Wikipedia (Google Translate from Russian):

September 20, 2011 Verkhovna Rada of Ukraine abolished the transition to winter time, keeping constant the summer, but October 18, 2011 reversed its decision.

-

Its all about Daylight saving time and actual versions.

Offline

Registered users online in this topic: 0, guests: 1
[Bot] ClaudeBot

Board footer

Powered by FluxBB
Modified by Visman

[ Generated in 0.015 seconds, 7 queries executed - Memory usage: 1.55 MiB (Peak: 1.77 MiB) ]