Welcome, Guest. Please login or register.

Author Topic: Amiga UNIX Y2K problem...no problem?  (Read 2260 times)

Description:

0 Members and 1 Guest are viewing this topic.

Offline FailureTopic starter

  • Lifetime Member
  • Sr. Member
  • ****
  • Join Date: Jun 2004
  • Posts: 332
    • Show all replies
    • http://awhitlock.net/
Amiga UNIX Y2K problem...no problem?
« on: January 21, 2006, 12:35:21 AM »
You can\'t spell evil without "vi"
AMIX Wiki | AmixBP
 

Offline FailureTopic starter

  • Lifetime Member
  • Sr. Member
  • ****
  • Join Date: Jun 2004
  • Posts: 332
    • Show all replies
    • http://awhitlock.net/
Re: Amiga UNIX Y2K problem...no problem?
« Reply #1 on: February 11, 2006, 03:41:10 AM »
I dunno.  For kicks I tried changing the value to 80, but it's still broken in the same way.  I'm curious about it but I'm not sure what I can do to fix it.

Not calling it at all seems to work well.  I had the machine off for a couple weeks recently, and when I booted it, it just used the date from the last time it was up.  Much better than 1978!  :-)
You can\'t spell evil without "vi"
AMIX Wiki | AmixBP
 

Offline FailureTopic starter

  • Lifetime Member
  • Sr. Member
  • ****
  • Join Date: Jun 2004
  • Posts: 332
    • Show all replies
    • http://awhitlock.net/
Re: Amiga UNIX Y2K problem...no problem?
« Reply #2 on: February 12, 2006, 07:45:04 PM »
@Piru:

Thanks a lot for taking a look at it! Looks like date can't handle it.  I enabled the DEBUG define in the code for extra output:
[color=0000ff]
Code: [Select]
root@motoko:~# date
Sun Feb 12 14:23:23 EST 2006
root@motoko:~# setclk
localtime (from system): 0215060979
time (to hardware): buffer=`0215060979', thetime=`0215060979'
Thu Feb 15 06:09:00 GMT 1979
root@motoko:~# ntpdate timex.peachnet.edu
Looking for host timex.peachnet.edu and service ntp
host found : ns2.usg.edu
12 Feb 14:23:43 ntpdate[195]: step time server 131.144.4.9 offset 851865265.938420 sec
root@motoko:~# date
Sun Feb 12 14:23:54 EST 2006
root@motoko:~# setclk -p
0215060979
root@motoko:~# setclk -s
localtime (from system): 02121924106
time (to hardware): buffer=`02121924106', thetime=`02121924106'
root@motoko:~# date
Sun Feb 12 14:24:12 EST 2006
root@motoko:~# setclk
date: bad conversion
[/color]
One interesting thing to note is the date calls setclk when it is used to set the time.  It apparently does this properly!
[color=0000ff]
Code: [Select]

root@motoko:~# date
Fri Feb 12 14:29:56 EST 1999
root@motoko:~# date 021214312006
localtime (from system): 02121931106
time (to hardware): buffer=`02121931106', thetime=`02121931106'
Sun Feb 12 14:31:00 EST 2006
[/color]
This suggests that if setclk.c was modified to use a 4 digit year it would work properly.  Source code for date isn't on the system.  Running setclk after setting the time this way results in "date: bad conversion".

@Dal:

I still play around with AMIX, but I've been so busy lately the site has been a bit neglected.  I'm finding 8 hours of work followed by study and homework a bit draining.  I want to finish my degree though...

One thing I want to get done is the history section of the site.  At one point I had at least a list of names of people who had worked on AMIX, and I thought I had found the website of one of them...in the shuffle though I seem to have lost most if not all of that.  I'll have to hit Google Groups again at some point.
You can\'t spell evil without "vi"
AMIX Wiki | AmixBP
 

Offline FailureTopic starter

  • Lifetime Member
  • Sr. Member
  • ****
  • Join Date: Jun 2004
  • Posts: 332
    • Show all replies
    • http://awhitlock.net/
Re: Amiga UNIX Y2K problem...no problem?
« Reply #3 on: April 05, 2008, 07:15:23 PM »
I had tried this patch a while ago, works great!  I'm having trouble putting the binary on the wiki, still having MySQL problems I have to correct whenever I try something new...but in the meantime the file can be fetched from the Amix box direct:

http://failsure.net:8085/root/sbin/setclk

Thanks for the efforts to fix this, really cool to boot and have the right time without use of NTP!
You can\'t spell evil without "vi"
AMIX Wiki | AmixBP