9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
* date command (Another question ? _o_ )
@ 1995-09-09  8:46 forsyth
  0 siblings, 0 replies; 8+ messages in thread
From: forsyth @ 1995-09-09  8:46 UTC (permalink / raw)


/adm/timezone/Japan is simpler than most:
% cat /adm/timezone/Japan
JST 32400

it looks as though ctime fails to realise that a single time zone & GMT offset
not followed by a list of time changes probably means that the location hasn't got
the notion of `daylight savings' or `summer time'.
instead it defaults to GMT, obviously aware of the splendid weather here this summer.
perhaps it's not worth changing the code.  i tried:

JST 32400 JST 32400

instead, and date then gave JST instead of defaulting to GMT.
try:
echo 'JST 32400 JST 32400' >/env/timezone
date

if the result looks right to you, update /adm/timezone/Japan and /adm/timezone/local.
(then reboot.)

if it still needs some adjustment, see ctime(2) for a description of the timezone
file format.






^ permalink raw reply	[flat|nested] 8+ messages in thread

* date command (Another question ? _o_ )
@ 1995-09-11 10:21 Kenji
  0 siblings, 0 replies; 8+ messages in thread
From: Kenji @ 1995-09-11 10:21 UTC (permalink / raw)


> >>After I applied above, and did the date command, I got a future time
> >>like this:
> >>      Sun Sep 10 03:36:55 JST 1995.
> >>I dispatched the date command at
> >>      Sat Sep  9 18:36:55.
> >>It's 9 hours ahead now.
> >>Kenji
> 
> 
> 	Plan 9 uses GMT as its time base, while DOS uses local time, so unless you live on the
> 	prime meridian you'll need to reset your DOS clock after running Plan 9.
> 
> (from ``The Various Ports'')

Oh!  Yes, I've not read 'Ports' documentation.  I'll do this, thank you.

I have onemore queston on time related things.

I noticed my clock becomes delay by delay after I run Plan 9, that is,
after running plan9 for a week, i've gotten 2 or 3 minutes delay.
I'm experiencing special case?

Kenji







^ permalink raw reply	[flat|nested] 8+ messages in thread

* date command (Another question ? _o_ )
@ 1995-09-09 18:44 Kenji
  0 siblings, 0 replies; 8+ messages in thread
From: Kenji @ 1995-09-09 18:44 UTC (permalink / raw)


> /adm/timezone/Japan is simpler than most:
> % cat /adm/timezone/Japan
> JST 32400
> 
> it looks as though ctime fails to realise that a single time zone & GMT offset
> not followed by a list of time changes probably means that the location hasn't got
> the notion of `daylight savings' or `summer time'.
> instead it defaults to GMT, obviously aware of the splendid weather here this summer.
> perhaps it's not worth changing the code.  i tried:
> 
> JST 32400 JST 32400
> 
> instead, and date then gave JST instead of defaulting to GMT.
> try:
> echo 'JST 32400 JST 32400' >/env/timezone
> date
> 
> if the result looks right to you, update /adm/timezone/Japan and /adm/timezone/local.
> (then reboot.)
> 
> if it still needs some adjustment, see ctime(2) for a description of the timezone
> file format.
> 

This time you don't get turget. :-)

After I applied above, and did the date command, I got a future time
like this:

      Sun Sep 10 03:36:55 JST 1995.

I dispatched the date command at

      Sat Sep  9 18:36:55.

It's 9 hours ahead now.

Kenji







^ permalink raw reply	[flat|nested] 8+ messages in thread

* date command (Another question ? _o_ )
@ 1995-09-09 15:21 Kenji
  0 siblings, 0 replies; 8+ messages in thread
From: Kenji @ 1995-09-09 15:21 UTC (permalink / raw)


> Changes to /adm/timezone/local normally don't take effect until the system is
> rebooted, at which point init sets /env/timezone from /adm/timezone/local.
> You can see the effect of your change in the current window by typing
> timezone=`{cat /adm/timezone/local} before running the date command.
> Reboot to get the change in all windows, or kill 8B=, fix timezone, and run a
> fresh 8B=.
> 

In my case, I rebooted the system many times.

As I'm afraid my poor English, please permit me to re-describe my problem.

When I dispatch date command, I get the output as

     Sat Sep  9 15:15:08 GMT 1995.

In the above result, the digits showing the local time and date is 
reported correctly, hwoever, it still says 'GMT' which should be
'JST' I think.

Are there anyone having this problem?

kenji







^ permalink raw reply	[flat|nested] 8+ messages in thread

* date command (Another question ? _o_ )
@ 1995-09-09 11:30 dhog
  0 siblings, 0 replies; 8+ messages in thread
From: dhog @ 1995-09-09 11:30 UTC (permalink / raw)


>/adm/timezone/Japan is simpler than most:
>% cat /adm/timezone/Japan
>JST 32400
>
>it looks as though ctime fails to realise that a single time zone & GMT offset
>not followed by a list of time changes probably means that the location hasn't got
>the notion of `daylight savings' or `summer time'.
>instead it defaults to GMT, obviously aware of the splendid weather here this summer.

This would be my fault -- I supplied a number of the timezone files, using a
program which converted the Berkeley zoneinfo files into Plan 9 format.
Evidently I didn't read ctime(2) carefully enough :-(

Looks like the following files in /adm/timezone are affected:

Australia_North
Canada_East-Saskatchewan
HST
Hongkong
Iceland
Japan
Mexico_BajaSur
Mexico_General
NZ_CHAT
ROC
Singapore
US_Arizona
US_East-Indiana
US_Hawaii


P.S.  A better way to do this in the future would be to modify the zoneinfo
compiler (zic) to produce Plan 9 format directly.  Then changes to timezones
could be incorporated without fuss.  There's an ftp site which holds updated
sets of rules in the form understood by zic.






^ permalink raw reply	[flat|nested] 8+ messages in thread

* date command (Another question ? _o_ )
@ 1995-09-09 11:11 forsyth
  0 siblings, 0 replies; 8+ messages in thread
From: forsyth @ 1995-09-09 11:11 UTC (permalink / raw)


>>After I applied above, and did the date command, I got a future time
>>like this:
>>      Sun Sep 10 03:36:55 JST 1995.
>>I dispatched the date command at
>>      Sat Sep  9 18:36:55.
>>It's 9 hours ahead now.
>>Kenji


	Plan 9 uses GMT as its time base, while DOS uses local time, so unless you live on the
	prime meridian you'll need to reset your DOS clock after running Plan 9.

(from ``The Various Ports'')

i suspect you have to reset it before running plan 9, too...
Plan 9 takes the contents of the hardware clock to be GMT.
DOS has set it to GMT+9 (your local time), Plan 9 takes that as GMT, then
date is encouraged by the JST timezone file entry to add another 32400 seconds:
thus GMT+9+9 and you end up in tomorrow.






^ permalink raw reply	[flat|nested] 8+ messages in thread

* date command (Another question ? _o_ )
@ 1995-09-08 11:40 Kenji
  0 siblings, 0 replies; 8+ messages in thread
From: Kenji @ 1995-09-08 11:40 UTC (permalink / raw)



I thank forsyth very much, his advice solved my CDROM problem, and now
I'm enjoying to read ISO9660 formatted CDROM by using Chinon's CDS-431
(very sloooow, though (old model).

Now, I changed the /adm/timzone/local from default to Japan, which
says JST and 9 hours ahead.   Then, I typed date command, and got a
line;

Fir Sep  8 11:36:35 GMT 1995.

The local time is correctly displayed, however I still have 'GMT" which
should be 'JST'.

Kenji

------------------------------------------------------------------------------
Kenji Okamoto     |  e-mail      okamoto@earth.cias.osakafu-u.ac.jp
 ______  __ |__   |  Universiy of Osaka Prefecture, Dept. of Earth Science,
|__\/__|   /|\    |  Gakuen-cho 1 - 1, Sakai, Osaka 593, Japan
||_|_| |  /-|-\   |  alternative e-mail: okamoto@upr.center.osakafu-u.ac.jp
------------------------------------------------------------------------------







^ permalink raw reply	[flat|nested] 8+ messages in thread

* date command (Another question ? _o_ )
@ 1995-09-08  7:37 dhog
  0 siblings, 0 replies; 8+ messages in thread
From: dhog @ 1995-09-08  7:37 UTC (permalink / raw)


Changes to /adm/timezone/local normally don't take effect until the system is
rebooted, at which point init sets /env/timezone from /adm/timezone/local.
You can see the effect of your change in the current window by typing
timezone=`{cat /adm/timezone/local} before running the date command.
Reboot to get the change in all windows, or kill 8½, fix timezone, and run a
fresh 8½.






^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~1995-09-11 10:21 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1995-09-09  8:46 date command (Another question ? _o_ ) forsyth
  -- strict thread matches above, loose matches on Subject: below --
1995-09-11 10:21 Kenji
1995-09-09 18:44 Kenji
1995-09-09 15:21 Kenji
1995-09-09 11:30 dhog
1995-09-09 11:11 forsyth
1995-09-08 11:40 Kenji
1995-09-08  7:37 dhog

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).