WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: ntpclient Blanks Screen  (Read 38122 times)

Online Rich

  • TinyCore Moderator
  • Hero Member
  • *****
  • Posts: 7426
Re: ntpclient Blanks Screen
« Reply #30 on: June 06, 2011, 09:17:03 AM »
Hi Guy
You might want to remove the following line from the wiki

Quote
The following is merely my way of describing what is defined in the first link of Robert reply #15 (see above):

What, no colored text? (Just kidding).


Offline Guy

  • Hero Member
  • *****
  • Posts: 1089
Re: ntpclient Blanks Screen
« Reply #31 on: June 06, 2011, 09:31:02 AM »
Removed that line. I had previously just copied the page as it was.

At some time in the future, the entire page could be edited, to look like a wiki page.

Only a small proportion of people contribute to the wiki. It would be nice if more did.

When useful info comes along, it is a good idea to put it on the wiki.

I have also found that some people improve pages that are there, but do not create new ones. So just by putting that page there, someone is likely to try to improve it.
Many people see what is. Some people see what can be, and make a difference.

Offline tinypoodle

  • Hero Member
  • *****
  • Posts: 3857
Re: ntpclient Blanks Screen
« Reply #32 on: June 06, 2011, 12:13:16 PM »
Removed that line. I had previously just copied the page as it was.

At some time in the future, the entire page could be edited, to look like a wiki page.

Only a small proportion of people contribute to the wiki. It would be nice if more did.

When useful info comes along, it is a good idea to put it on the wiki.

I have also found that some people improve pages that are there, but do not create new ones. So just by putting that page there, someone is likely to try to improve it.

+1

Or should I have said:"Guilty as charged!"?   :P

Reminder: At current, forum login credentials can be used for wiki login.
"Software gets slower faster than hardware gets faster." Niklaus Wirth - A Plea for Lean Software (1995)

Offline redwolf

  • WikiUser
  • *
  • Posts: 20
Re: ntpclient Blanks Screen
« Reply #33 on: November 02, 2011, 10:10:40 PM »
We use the TZ var because it saves space. If you wish to have DST automatically without having tz set to anything, just grab your timezone file from tzdata.tcz, copy as /etc/localtime, add /etc/localtime to backup.

I realize this is an older thread, and I apologize ahead of time if this is not the most appropriate place to post, but I have just tried exactly what you've described here, yet date still outputs UTC time rather than my local time zone's time after backing up and rebooting.

1. cp /usr/local/share/zoneinfo/US/Pacific /etc/localtime
2. add etc/localtime to /opt/.filetool.sh
3. backup
4. reboot
5. date outputs UTC rather than Pacific time

Offline curaga

  • Administrator
  • Hero Member
  • *****
  • Posts: 10166
Re: ntpclient Blanks Screen
« Reply #34 on: November 03, 2011, 06:43:00 AM »
I think I was missing one step, a bootcode of "tz=/etc/localtime". It should work without, but I confirm this is needed.

edit: our bug. Until we have a fix, either set the tz bootcode like that, or add "unset TZ" to your .profile.
« Last Edit: November 03, 2011, 06:56:07 AM by curaga »
The only barriers that can stop you are the ones you create yourself.

Offline roberts

  • Administrator
  • Hero Member
  • *****
  • Posts: 7361
  • Founder Emeritus
Re: ntpclient Blanks Screen
« Reply #35 on: November 03, 2011, 07:03:04 AM »
@Redwolf, if you are in Pacific Time Zone why bloat up your system with tzdata when using the simple version of TZ works !

The specific example for the Pacific Time Zone has been in the FAQ since day 1.
http://distro.ibiblio.org/tinycorelinux/faq.html#timezone

tz=PST+8PDT,M3.2.0/2,M11.1.0/2
« Last Edit: November 03, 2011, 07:29:33 AM by roberts »
10+ Years Contributing to Linux Open Source Projects.

Offline roberts

  • Administrator
  • Hero Member
  • *****
  • Posts: 7361
  • Founder Emeritus
Re: ntpclient Blanks Screen
« Reply #36 on: November 03, 2011, 07:28:18 AM »
Not a bug.  The tzdata.tcz extension's info file explains how to set the TZ boot option for use with this extension.
« Last Edit: November 03, 2011, 07:31:21 AM by roberts »
10+ Years Contributing to Linux Open Source Projects.

Offline redwolf

  • WikiUser
  • *
  • Posts: 20
Re: ntpclient Blanks Screen
« Reply #37 on: November 03, 2011, 10:46:26 AM »
Thank you both for clarifying.  Setting TZ=/etc/localtime was all that was needed. 

@roberts, the only reason I tried doing it with tzdata was because of this excerpt from manual/libc/TZ-Variable.html.

Quote
In POSIX.1 systems the value of the TZ variable can be in one of three formats. With the GNU C library, the most common format is the last one, which can specify a selection from a large database of time zone information for many regions of the world. The first two formats are used to describe the time zone information directly, which is both more cumbersome and less precise.

Specifying via tz=PST+8PDT,M3.2.0/2,M11.1.0/2 certainly doesn't seem any more cumbersome; it was the bit about being less precise that led me to try the tzdata approach.  Honestly, I'm not even sure how or why or how significant it is. Though, it sounds like part of it may have to do with dates/times in the past.

Quote
The schedule of Daylight Saving Time in any particular jurisdiction has changed over the years. To be strictly correct, the conversion of dates and times in the past should be based on the schedule that was in effect then. However, this format has no facilities to let you specify how the schedule has changed from year to year. The most you can do is specify one particular schedule—usually the present day schedule—and this is used to convert any date, no matter when. For precise time zone specifications, it is best to use the time zone information database

Maybe I'm making a mountain out of a mole hill? 

Offline roberts

  • Administrator
  • Hero Member
  • *****
  • Posts: 7361
  • Founder Emeritus
Re: ntpclient Blanks Screen
« Reply #38 on: November 03, 2011, 11:46:33 AM »
FWIW. Using the boot code with specifics, e.g.,  tz=PST+8PDT,M3.2.0/2,M11.1.0/2
is not only much much smaller, it empowers the user to change when needed the Daylight Savings offset.

Using the tzdata means if the DST offset is changed, the user will either have to create/update their corresponding data file, or, worse wait for an update from the extension maker. zic comes to mind!

That is two benefits of using the default, i.e., avoiding the extension.

It is understandable if a user is located which is not well served by TZ specifics, although I can't think of any.

But as with most things tinycore it is your decision on what works best for you.

Glad to hear that you have it working.
« Last Edit: November 03, 2011, 12:54:06 PM by roberts »
10+ Years Contributing to Linux Open Source Projects.

Offline Greg Erskine

  • Sr. Member
  • ****
  • Posts: 280
Re: ntpclient Blanks Screen
« Reply #39 on: May 31, 2014, 04:55:16 PM »
Nice summary, SamK!!

If your are still not keen to create your very own TZ string you can cheat by taking a peek in the (binary) zoneinfo files of the tzdata.tcz extension. Please note that in the following steps (using London as an example) the extension gets merely downloaded (to the home directory), extracted and right away removed again. So nothing remains afterwards. Let's face it, you probably need to find out your local TZ definition only a few times in your life (e.g. when you move or your daylight saving timeframe changes):
Code: [Select]
tc@box:~$ tce-fetch.sh tzdata.tcz
tc@box:~$ mkdir ext
tc@box:~$ sudo mount tzdata.tcz ext -t squashfs -o loop,ro,bs=4096
tc@box:~$ find ext/usr/local/share/zoneinfo -type f -name London | xargs tail -1
GMT0BST,M3.5.0/1,M10.5.0
tc@box:~$ umount ext
tc@box:~$ rm -rf ext tzdata.tcz
If you are not sure about the city to specify in the 'find' command, have a look around the files in the 'zoneinfo' directory (and it's sub-directories) and just use 'tail -1 FILE' for the FILE that best fits your needs.

Hi,

I was just using this code that I found in the Timezone wiki.
http://wiki.tinycorelinux.net/wiki:time_zone

I have a couple of questions.

1. Should I be appending to this old thread. It makes sense to me but the forum warns me about it being greater than 120 days old? (Oops, just saw the title once I posted, I got there via search)
2. Should I edit the wiki directly?
3. Are 4, 5, 6 piCore specific?
4. ext/usr/local/share/zoneinfo should be ext/usr/local/etc/zoneinfo
5. umount ext should be sudo umount ext
6. tzdata.tcz contains all the Australian capital cities except Sydney

regards
Greg
« Last Edit: May 31, 2014, 04:57:26 PM by Greg Erskine »