The Unix Heritage Society mailing list
 help / color / mirror / Atom feed
* [TUHS] Date madness
@ 2017-12-13 22:16 Norman Wilson
  2017-12-14  0:24 ` Chris Torek
  0 siblings, 1 reply; 50+ messages in thread
From: Norman Wilson @ 2017-12-13 22:16 UTC (permalink / raw)


Arnold:

  ISTR that the vaxen did have such things.  Or rather, I ran some BSD 780s
  for several years and I don't remember having to set the date / time
  every time I did a reboot.  They sat in a data center, so I may have never
  done a cold boot from power on.  It was a LONG time ago now, so there's
  undoubtedly lots that I just plain don't remember.

====

I believe all the VAXes had time-of-year clocks, though
the implementation and the method of access varied from
model to model.  On `Big' VAXes, the clock was considered
part of the console front-end, and accessed through the
model-specific console scheme.  MicroVAXes had no console
front-end; I believe the clock was accessed through
registers, but it was an off-the-shelf digital-watch
chip with some funny format (separate registers for
year, month, day, hour, minute, second).

So they all had proper battery-backed-up clocks, but of
many different types.  It wasn't as simple as reading a
single counter out of a register, sensible as that might
seem.

If anyone's really interested I can dig up details for
the several models of Big and MicroVAX I dealt with; I
still have all the code lying around.

Norman Wilson
Toronto ON


^ permalink raw reply	[flat|nested] 50+ messages in thread
* [TUHS] Date madness
@ 2017-12-16 10:50 Doug McIlroy
  2017-12-16 16:11 ` Random832
  0 siblings, 1 reply; 50+ messages in thread
From: Doug McIlroy @ 2017-12-16 10:50 UTC (permalink / raw)


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 1211 bytes --]

>>>  Flipping it to unsigned int was the quickest way out to kick the can until Sun Feb 6 06:28:15 2106.  If you have source it’s incredibly trivial to change, and nothing changes size wise.
>>
>> Easy, but perhaps unwise. The sign bit is a potential escape hatch for
>> times, just as it is for characters in UTF-8.
> 
> I'm not sure what you're suggesting - UTF-8 works because it's a
variable length encoding - a variable length timestamp might be
interesting as an academic exercise, but there's no way for time() to
specify how much space is needed, or be informed of how much space is
allocated

Like UTF-8, a variable-length time would be something normal
programs aren't supposed to see--it would be a format for
external media (i.e. file systems). Times in inodes would be
variable-length. Times returned by stat() and time() would
be full length. Only the kernel needs to know the encoding.

One may note that inodes already use a variable-length
encoding for the list of physical block addresses, so there 
is nothing radical here.

I admit, though, that if the kernel can tell "old" from "new"
inodes, then they could have different time encodings rather
than one variable-length encoding.

Doug


^ permalink raw reply	[flat|nested] 50+ messages in thread
* [TUHS] Date madness
@ 2017-12-13 20:22 Noel Chiappa
  0 siblings, 0 replies; 50+ messages in thread
From: Noel Chiappa @ 2017-12-13 20:22 UTC (permalink / raw)


    > From: Tom Ivar Helbekkmo

    > My /83s have them, but I'm not so sure it's a feature of the CPU board:
    > there's this thought nagging in the back of my head that the ToY thing
    > actually sits in the front panel module with the various buttons on it.

/83 documentation seems to be very thin on the ground, alas.

It's definitely not the CPU; the KDJ11-B CPU (of the /83) manual
(EK-KDJ1B-UG-001) makes no mention of it; and in the PDP-11/94E System User
and Maintenance Guide (EK-KDJ1E-UG-001), section D.2 "PDP-11/94 and 11/84
Hardware Differences" (the /?3 and /?4 models use the same CPU board, but a
different backplane, with QBUS/UNIBUS converter, so this could equally well be
titled "PDP-11/93 and 11/83 Hardware Differences") says "Time of Year Clock",
indicating the 83/84 don't have one.

Several companies made after-market ToD clocks to plug into the QBUS, e.g.
here:

  https://www.ebay.com/itm/371284594072

Is something like that what your /83 has?

   Noel


^ permalink raw reply	[flat|nested] 50+ messages in thread
* [TUHS] Date madness
@ 2017-12-13 19:12 Doug McIlroy
  2017-12-14  3:07 ` Random832
  0 siblings, 1 reply; 50+ messages in thread
From: Doug McIlroy @ 2017-12-13 19:12 UTC (permalink / raw)


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 316 bytes --]

>  Flipping it to unsigned int was the quickest way out to kick the can until Sun Feb 6 06:28:15 2106.  If you have source it’s incredibly trivial to change, and nothing changes size wise.

Easy, but perhaps unwise. The sign bit is a potential escape hatch for
times, just as it is for characters in UTF-8.

Doug


^ permalink raw reply	[flat|nested] 50+ messages in thread
* [TUHS] Date madness
@ 2017-12-13 17:16 Noel Chiappa
  2017-12-13 18:53 ` Tom Ivar Helbekkmo
                   ` (2 more replies)
  0 siblings, 3 replies; 50+ messages in thread
From: Noel Chiappa @ 2017-12-13 17:16 UTC (permalink / raw)


    > From: Arnold

    > One would think that SIMH

I'm using Ersatz-11...

    > into the simulated computer's time of day clock.

What Time of Day clock? We're talking PDP-11's here! :-)

The very last DEC models of the -11 (/93-94) had a ToY clock; I'm pretty sure
none of their others did. And of course V6 long pre-dated the /93-94.

   Noel


^ permalink raw reply	[flat|nested] 50+ messages in thread
* [TUHS] Date madness
@ 2017-12-13 16:31 Noel Chiappa
  2017-12-13 16:50 ` arnold
  0 siblings, 1 reply; 50+ messages in thread
From: Noel Chiappa @ 2017-12-13 16:31 UTC (permalink / raw)


    > From: Arnold

    > So how did you manage to lose a whole year? Time travel? :-)

No, I just haven't booted the V6 often in the last year, and when I did, I
never bothered to reset the time; so it was still on Nov, 2016.

	Noel


^ permalink raw reply	[flat|nested] 50+ messages in thread
* [TUHS] Date madness
@ 2017-12-13 16:08 Noel Chiappa
  2017-12-13 16:23 ` arnold
  0 siblings, 1 reply; 50+ messages in thread
From: Noel Chiappa @ 2017-12-13 16:08 UTC (permalink / raw)


    > So, I looked at the code, and the bug is not obvious.

Because there _was_ no bug!!! :-)

It was saying December 12 was a Monday because the _year_ was still set to
_2016_, and in 2016, December 12 _was_ a Monday!

{Smacks forehead!}

	Noel


^ permalink raw reply	[flat|nested] 50+ messages in thread
* [TUHS] Date madness
@ 2017-12-13 15:56 Noel Chiappa
  0 siblings, 0 replies; 50+ messages in thread
From: Noel Chiappa @ 2017-12-13 15:56 UTC (permalink / raw)


    > Guess the date code is probably missing the '400 year' exception.

So, I looked at the code, and the bug is not obvious. (The routine for
detecting leap years in V6's ctime.c is so minimalistic it actually works for
2000!)

The version I'm currently running had been worked on some, to have a hack fix
for the overflow of the number of 8-hour periods since the epoch ("hack" since
the 'fixed' version will break in 2029 or so), and I was worried that 'fix'
was wrong and caused the week-day problem, but I don't think so.

    Noel


^ permalink raw reply	[flat|nested] 50+ messages in thread
* [TUHS] Date madness
@ 2017-12-12 18:31 Noel Chiappa
  0 siblings, 0 replies; 50+ messages in thread
From: Noel Chiappa @ 2017-12-12 18:31 UTC (permalink / raw)


    > From: Warner Losh

    > So at some point you had to hack things in to make 20xx work, no?

I had a number of date issues with V6; more here:

  http://mercury.lcs.mit.edu/~jnc/tech/V6Unix.html#Issues

That one was the easiest to fix! (Although this one will probably also be
pretty easy, too.)

	Noel


^ permalink raw reply	[flat|nested] 50+ messages in thread
* [TUHS] Date madness
@ 2017-12-12 18:01 Noel Chiappa
  2017-12-12 18:21 ` Warner Losh
                   ` (4 more replies)
  0 siblings, 5 replies; 50+ messages in thread
From: Noel Chiappa @ 2017-12-12 18:01 UTC (permalink / raw)


Heh, my V6 machine thinks (via 'date') that today is _Monday_, December
12th. Oddly enough, 'cal 17 2017' on it produces the right thing. Guess the
date code is probably missing the '400 year' exception.

	Noel



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

end of thread, other threads:[~2017-12-19  0:48 UTC | newest]

Thread overview: 50+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-12-13 22:16 [TUHS] Date madness Norman Wilson
2017-12-14  0:24 ` Chris Torek
2017-12-17 16:20   ` Ron Natalie
2017-12-17 18:53     ` Tom Ivar Helbekkmo
2017-12-17 20:07       ` Ron Natalie
2017-12-17 21:24         ` [TUHS] OT: trains [Was: Date madness] Ian Zimmerman
2017-12-17 22:35           ` Dave Horsfall
2017-12-18 13:03             ` Norman Wilson
2017-12-18 16:45               ` Ian Zimmerman
2017-12-19  0:48                 ` Dave Horsfall
2017-12-18 16:12           ` Steve Mynott
  -- strict thread matches above, loose matches on Subject: below --
2017-12-16 10:50 [TUHS] Date madness Doug McIlroy
2017-12-16 16:11 ` Random832
2017-12-16 17:11   ` Ralph Corderoy
2017-12-13 20:22 Noel Chiappa
2017-12-13 19:12 Doug McIlroy
2017-12-14  3:07 ` Random832
2017-12-15  3:04   ` Random832
2017-12-13 17:16 Noel Chiappa
2017-12-13 18:53 ` Tom Ivar Helbekkmo
2017-12-13 20:46 ` arnold
2017-12-15 16:41   ` Paul Winalski
2017-12-15 17:19     ` Dave Horsfall
2017-12-16 15:45     ` Clem Cole
2017-12-16  3:39   ` Dave Horsfall
2017-12-16  3:45     ` Lyndon Nerenberg
2017-12-17  1:43       ` Dave Horsfall
2017-12-14  3:08 ` Dave Horsfall
2017-12-14  3:13   ` Warner Losh
2017-12-13 16:31 Noel Chiappa
2017-12-13 16:50 ` arnold
2017-12-13 16:08 Noel Chiappa
2017-12-13 16:23 ` arnold
2017-12-13 15:56 Noel Chiappa
2017-12-12 18:31 Noel Chiappa
2017-12-12 18:01 Noel Chiappa
2017-12-12 18:21 ` Warner Losh
2017-12-13 15:07 ` Random832
2017-12-13 17:00   ` Jason Stevens
2017-12-13 17:18     ` Ron Natalie
2017-12-13 18:02       ` Arthur Krewat
2017-12-13 15:39 ` Wolfgang Helbig
2017-12-14  0:57 ` Dave Horsfall
2017-12-14 14:09   ` William Cheswick
2017-12-17 16:19     ` Ron Natalie
2017-12-17 16:33       ` William Cheswick
2017-12-17 17:54         ` Random832
2017-12-17 22:15           ` Dave Horsfall
2017-12-17 22:54             ` Ian Zimmerman
2017-12-16 18:12 ` Wolfgang Helbig

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