Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Getting date to stay the same across dual system
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Gentoo on PPC
View previous topic :: View next topic  
Author Message
Elsipkitch9809
Apprentice
Apprentice


Joined: 21 Jul 2002
Posts: 186

PostPosted: Fri Apr 23, 2004 9:37 pm    Post subject: Getting date to stay the same across dual system Reply with quote

I've been searching for some help on this, and I managed to find out how to use hwclock instead of date. But now, I'm still confused about how to keep the date on a dual linux/macosx system permanent, no matter what system i boot into.

I figure it must have something to do with openfirmware and the timezone setting (which is set to est in linux), so I put it in the PPC forum. Sorry if I miscategorized it.

Anyway, I use hwclock every time to set the clock right, and I know that on boot and shutdown/reboot it "syncs hardware clock to system time".

1) how do I disable that?
2) does the hwclock for ppc linux set the openfirmware time? When I boot into macosx, I always get a different time (which must be a timezone issue) than what linux uses. If so, can i boot into openfirmware to set some kind of universal time setting? (I'm used to setting the BIOS time from my old x86 machines)

Sorry if this has been handled before somewhere. I vaguely remember seeing something about this, but I can't find it anywhere (and dont know the proper search terms).

Thanks


Last edited by Elsipkitch9809 on Tue Mar 01, 2016 5:43 am; edited 1 time in total
Back to top
View user's profile Send private message
killfire
l33t
l33t


Joined: 04 Oct 2003
Posts: 618

PostPosted: Sat Apr 24, 2004 12:44 am    Post subject: Reply with quote

i hope zojas wont mind, but i will copy what he has written about this on his page (http://www.desertsol.com/~kevin/ppc/#clock), for the purpose of you rapid (i hope) solution:

"Clock
OS X uses localtime in the hardware clock. Keep that in mind when you're tweaking /etc/rc.conf. I'd rather put UTC in the hardware clock because it's easy to change timezones when you're traveling; you don't have to touch the clock, just change the /etc/localtime file. Oh well. I could just set the hardware clock to UTC anyway but I'll probably be in OS X just enough to make having the hardware clock set to UTC be annoying.

In /etc/init.d/clock, there is a line which looks like this:

errstr="$(/sbin/hwclock --adjust ${myopts} 2>&1 >/dev/null)"

You will want to comment this line out. This tries to adjust the clock for the amount of time since last time the system was booted. Works great until some one else (like Mac OS X) starts independently adjusting the clock. eventually, the dynamic correction factor can get large enough that your clock can be hours off on boot."


-killfire
Back to top
View user's profile Send private message
DiskBreaker
Apprentice
Apprentice


Joined: 07 Oct 2003
Posts: 224

PostPosted: Sun Apr 25, 2004 9:08 am    Post subject: Reply with quote

Save yourself a lot of headaches and use NTP on both Linux and OS X.

Code:
$emerge ntp
$rc-update add ntpd default
Back to top
View user's profile Send private message
stimuli
Apprentice
Apprentice


Joined: 16 Dec 2002
Posts: 292
Location: Vancouver, BC, Canada

PostPosted: Mon Apr 26, 2004 10:23 pm    Post subject: Reply with quote

Oddly I just linked the appropriate /usr/share/zoneinfo and my clock is always correct in both OSes. My Tibook's clock must be UTC.
Back to top
View user's profile Send private message
shmurfect
n00b
n00b


Joined: 18 Apr 2002
Posts: 19

PostPosted: Fri Apr 30, 2004 9:30 pm    Post subject: Reply with quote

same here, just the correct zoneinfo link and UTC do the trick nicely
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Gentoo on PPC All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum