9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
* [9fans] Attempts to set timezone don't stick?
@ 2012-11-13  1:33 Phineas Pett
  2012-11-13  1:39 ` John Floren
  0 siblings, 1 reply; 5+ messages in thread
From: Phineas Pett @ 2012-11-13  1:33 UTC (permalink / raw)
  To: 9fans

Hello List,

I'm attempting to setup a native Plan 9 system for the first time, but
I'm having a bit of trouble getting the timezone to ``stick.''

Putting the following in my /lib/profile seemed the intuitive and
correct thing to do:

bind /adm/timezone/US_Central /adm/timezone/local

But it does not work, and I don't understand why.

The following also failed:

cat /adm/timezone/US_Central > /adm/timezone/local

In desperation I set the clock to sync with a time server.  This
works, but the clock only remains set for a few minutes and then it is
drastically off again until it contacts the time.

The hardware is a ThinkPad R-51.

Thanks,
Phineas



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

* Re: [9fans] Attempts to set timezone don't stick?
  2012-11-13  1:33 [9fans] Attempts to set timezone don't stick? Phineas Pett
@ 2012-11-13  1:39 ` John Floren
  2012-11-13  2:15   ` Phineas Pett
  0 siblings, 1 reply; 5+ messages in thread
From: John Floren @ 2012-11-13  1:39 UTC (permalink / raw)
  To: Fans of the OS Plan 9 from Bell Labs

On Mon, Nov 12, 2012 at 5:33 PM, Phineas Pett <phineas.pett@gmail.com> wrote:
> Hello List,
>
> I'm attempting to setup a native Plan 9 system for the first time, but
> I'm having a bit of trouble getting the timezone to ``stick.''
>
> Putting the following in my /lib/profile seemed the intuitive and
> correct thing to do:
>
> bind /adm/timezone/US_Central /adm/timezone/local
>
> But it does not work, and I don't understand why.

I wouldn't expect this to work. According to date(1),
/adm/timezone/local is copied into /env/timezone by init, meaning your
bind comes far too late.

You need to physically copy the file over, and then presumably reboot
to get everything set properly.

>
> The following also failed:
>
> cat /adm/timezone/US_Central > /adm/timezone/local
>

Did you reboot after doing this?


John



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

* Re: [9fans] Attempts to set timezone don't stick?
  2012-11-13  1:39 ` John Floren
@ 2012-11-13  2:15   ` Phineas Pett
  2012-11-13  2:29     ` Anthony Sorace
  2012-11-13  2:36     ` [9fans] [FIXED] " Phineas Pett
  0 siblings, 2 replies; 5+ messages in thread
From: Phineas Pett @ 2012-11-13  2:15 UTC (permalink / raw)
  To: Fans of the OS Plan 9 from Bell Labs

On 11/12/12, John Floren <john@jfloren.net> wrote:
> On Mon, Nov 12, 2012 at 5:33 PM, Phineas Pett <phineas.pett@gmail.com>
> wrote:
>> Hello List,
>>
>> I'm attempting to setup a native Plan 9 system for the first time, but
>> I'm having a bit of trouble getting the timezone to ``stick.''
>>
>> Putting the following in my /lib/profile seemed the intuitive and
>> correct thing to do:
>>
>> bind /adm/timezone/US_Central /adm/timezone/local
>>
>> But it does not work, and I don't understand why.
>
> I wouldn't expect this to work. According to date(1),
> /adm/timezone/local is copied into /env/timezone by init, meaning your
> bind comes far too late.

Ah, thanks.  The manual has answered a lot of my questions so far, but
apparently I need to read more carefully; but still, if I am logged
into a remote system in a different time zone, shouldn't my client be
able to display client-local time?  Is there a mechanism for that?  It
seems to me that would be a logical benefit of the client having its
own view of the namespace.



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

* Re: [9fans] Attempts to set timezone don't stick?
  2012-11-13  2:15   ` Phineas Pett
@ 2012-11-13  2:29     ` Anthony Sorace
  2012-11-13  2:36     ` [9fans] [FIXED] " Phineas Pett
  1 sibling, 0 replies; 5+ messages in thread
From: Anthony Sorace @ 2012-11-13  2:29 UTC (permalink / raw)
  To: Fans of the OS Plan 9 from Bell Labs

On Nov 12, 2012, at 21:15 , Phineas Pett <phineas.pett@gmail.com> wrote:

> Ah, thanks.  The manual has answered a lot of my questions so far, but
> apparently I need to read more carefully; but still, if I am logged
> into a remote system in a different time zone, shouldn't my client be
> able to display client-local time?  Is there a mechanism for that?  It
> seems to me that would be a logical benefit of the client having its
> own view of the namespace.

You can do that, if you really want. Observe the following:

: root; date
Mon Nov 12 21:24:49 EST 2012
: root; bind /adm/timezone/US_Hawaii /adm/timezone/local
: root; date
Mon Nov 12 21:25:21 EST 2012
: root; cp /adm/timezone/local /env/timezone
: root; date
Mon Nov 12 16:25:30 HST 2012

(the bind isn't needed, you can copy directly; it's just there for illustration)

Note, however, that everything started before you do this will have the old
idea about the timezone. Personally, when I've been in that situation, I've
found the cost of getting confused between, say, what a log file says
versus what 'date' says to be more problematic than just remembering that
I'm (virtually) in Japan.

Anthony




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

* Re: [9fans] [FIXED] Attempts to set timezone don't stick?
  2012-11-13  2:15   ` Phineas Pett
  2012-11-13  2:29     ` Anthony Sorace
@ 2012-11-13  2:36     ` Phineas Pett
  1 sibling, 0 replies; 5+ messages in thread
From: Phineas Pett @ 2012-11-13  2:36 UTC (permalink / raw)
  To: Fans of the OS Plan 9 from Bell Labs

On 11/12/12, Phineas Pett <phineas.pett@gmail.com> wrote:
> On 11/12/12, John Floren <john@jfloren.net> wrote:
>> On Mon, Nov 12, 2012 at 5:33 PM, Phineas Pett <phineas.pett@gmail.com>
>> wrote:
>>> Hello List,
>>>
>>> I'm attempting to setup a native Plan 9 system for the first time, but
>>> I'm having a bit of trouble getting the timezone to ``stick.''
>>>
>>> Putting the following in my /lib/profile seemed the intuitive and
>>> correct thing to do:
>>>
>>> bind /adm/timezone/US_Central /adm/timezone/local
>>>
>>> But it does not work, and I don't understand why.
>>
>> I wouldn't expect this to work. According to date(1),
>> /adm/timezone/local is copied into /env/timezone by init, meaning your
>> bind comes far too late.
>
> Ah, thanks.  The manual has answered a lot of my questions so far, but
> apparently I need to read more carefully; but still, if I am logged
> into a remote system in a different time zone, shouldn't my client be
> able to display client-local time?  Is there a mechanism for that?  It
> seems to me that would be a logical benefit of the client having its
> own view of the namespace.
>

Ok thanks to both of you!  I may have been too hasty responding
earlier, I apologize for that.

Running a single aux/timesync process from profile now keeps the clock
steadily set.

And a simple

cat /adm/timezone/[timezone] > /env/timezone

in the profile can set an arbitrary timezone locally.

Phineas



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

end of thread, other threads:[~2012-11-13  2:36 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-11-13  1:33 [9fans] Attempts to set timezone don't stick? Phineas Pett
2012-11-13  1:39 ` John Floren
2012-11-13  2:15   ` Phineas Pett
2012-11-13  2:29     ` Anthony Sorace
2012-11-13  2:36     ` [9fans] [FIXED] " Phineas Pett

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).