| This project has started a couple
of times. But always, so far, stopped when hitting the proverbial brick wall. Of course gaining knowledge during the hunt for a clue but no solution. Well, this time, when setting up a different distro and getting into some unexpected problems, a new clue came to the surface. After finishing the arised challenges, a new hunt about the timezone business on the Freesco box started. This time the challenge should be conquered ;-) And the secret is ... The timezone thingy is, that libc wants access to where the timezone file is spending its time and this is hardcoded into the lib: /usr/lib/zoneinfo libc will try to understand any file residing there with the name of localtime. That's it. Note that the file localtime shall be the binary file, of a selected timezone, available on many Linux distros. Freesco 027 Put your selected timezone file in place and add 2 lines of code into the rc_user file. [Li nux] cd /mnt/router/packages [L inux] mkdir tz Copy your selected timezone file into the /mnt/router/packages/tz
directory. [Linux] cd /rc [Linux ] edit rc_user Insert into the firewall section: mkdir /usr/lib/zoneinfo ln -sf /mnt/router/packages/tz/your-tz /usr/lib/zoneinfo/localtime Save and restart your Freesco box to observe it wake up with a time warp, you've never seen before. Freesco 03x Put your selected timezone file in place and make the connection, according to an advice from Lightning, to make it simple. [Linux ] cd /pkg/usr/lib [Linu x] mkdir zoneinfo Copy your selected timezone file, renamed to localtime, into the /pkg/usr/lib/zoneinfo directory. Even on the newer version you'll have to restart your Freesco box to observe the instantiation, with a time warp you've never had your eyes on before. From now on you can enjoy a sight like this: [ Linux] /bin/date Tue Jul 27 15:00:10 CEST 2004 And also, for a change, do a little time warp: [Linu x] /bin/date -u Tue Jul 27 13:00:13 UTC 2004 When it's time to sync with real time in the fall, it's taken care of without any hesitation or need for manual handling: [Linu x] /bin/date Sun Oct 31 21:52:51 CET 2004 Make shure this business with timezone didn't make your Freesco lost in time. [Linux] ntpdate -q www.clock.org server 192.5.16.65, stratum 3, offset 0.002043, delay 0.22205 27 Jul 16:27:53 ntpdate[5500]: adjust time server 192.5.16.65 offset 0.002043 sec For those people not having another Linux box in sight, here is a file containing more than 160 files for different timezones. As a tgz file, about 41K. timezone.tgz As a zipped file, about 86K. timezone.zip The content of this file is as follows: AST4ADT, Alaska, Amsterdam, Anchorage, Arizona, Athens, Atlantic, Auckland, Baghdad, Bangkok, Barbados, Beirut, Belfast, Belgrade, Belize, Berlin, Bermuda, Bogota, Boise, Brisbane, Brunei, Brussels, Budapest, CST6CDT, Cairo, Calcutta, Canberra, Cancun, Caracas, Central, Chicago, Chungking, Colombo, Copenhagen, Costa_Rica, Cuba, Dakar, Damascus, Dubai, Dublin, EST5EDT, East-Indiana, East-Saskatchewan, Easter, Eastern, Edmonton, Egypt, Eire, El_Salvador, Fiji, GB, GMT, GMT+1, GMT+10, GMT+11, GMT+12, GMT+2, GMT+3, GMT+4, GMT+5, GMT+6, GMT+7, GMT+8, GMT+9, GMT-1, GMT-10, GMT-11, GMT-12, GMT-13, GMT-14, GMT-2, GMT-3, GMT-4, GMT-5, GMT-6, GMT-7, GMT-8, GMT-9, Gaza, Gibraltar, Greenwich, Guam, Halifax, Havana, Hawaii, Helsinki, Hong_Kong, Honolulu, Iceland, Indianapolis, Iran, Israel, Jakarta, Jamaica, Japan, Johannesburg, Kabul, Karachi, Kuala_Lumpur, Kuwait, Libya, Lisbon, London, Los_Angeles, Louisville, Luxembourg, MST7MDT, Macau, Madrid, Malta, Manila, Mexico_City, Michigan, Midway, Monaco, Monterrey, Montreal, Moscow, Mountain, New_York, Newfoundland, Oslo, PRC, PST8PDT, Pacific, Panama, Paris, Perth, Phoenix, Poland, Port-au-Prince, Port_of_Spain, Portugal, Prague, Queensland, ROC, Regina, Rome, Saigon, Samoa, Santiago, Seoul, Shanghai, Singapore, South_Pole, St_Johns, Stockholm, Taipei, Tehran, Tel_Aviv, Thunder_Bay, Tokyo, Turkey, UTC, Universal, Vancouver, Vatican, Vienna, Warsaw, Whitehorse, Winnipeg, YST9YDT, Yukon, Zulu, Zurich. Some observations On Freesco 027 just date displays mostly as expected, but sometimes it seems to return to pre-tz time. Sofar I've traced this behaviour to the shell stepping in and taking order on the side. /bin/date display as expected, always. In the syslog, in Freesco 027, there's one application not accepting the timezone time. Any output from named is accompanied by the unchanged time. In the syslog, in Freesco 03x, there's also one application not accepting the timezone time. Any output from firewall log is accompanied by unchanged time. Remember that any time dependent activity running on your Freesco box is governed by systemtime and timezone. Maybe there are some activity that needs to be adjusted? At least it occured locally. About the timezone adjustment in setup, I suggest you should change to GMT 0000, as your Freesco box isn't likely to 'multiboot' into DOS or Windows :). All normal services about time is done in the GMT timezone. If not doing a change then awful things happens when synctime tries to correct, as it thinks, the skewed time. [Linux ] synctime offset = -0.027277 time zone = 200 Time correction = 7199.97 (7199 sec. 972656 usec) Succesfully adjusted clock OhNo, such success I can live without :-) In the offset files you might want to know that 1h east of GMT has the file GMT-1. Dunno why, just empirical knowledge. Be work zoning. |
hansmade | 10-7-6 |