Since 3BSD is V7/V32 based - the TZ is sent in the kernel in sys/param.h and compiled into it.
The system calls and user service calls in section 2 and 3 are seeded from the value that the kernel returns.

The TZ environment variable was introduced in the PWB / SYS x  editions. It was in PWB 3 and may have been
added before that.  I don't remember when the BSD stream picked it up - it may not have been until after
the original /usr/group 1984 UNIX standard of the early 1980s - which I codified it in their environ(5) definition.

The team in CSRG for BSD4.2 developed the time modern timezone database that we see in most UNIX flavors at this time. 
I don't remember where tzset(3) call was introduced, to be honest, it was some time (in years IIRC) 
after the TZ environment variable originally was created.

On Wed, Aug 30, 2023 at 7:12 AM KenUnix <ken.unix.guy@gmail.com> wrote:
Hi all.

Got a question. With 3BSD I have been unable to find where the time zone is set. I have looked at
date.c, time.h and timebuf.h. In the meantime I fixed date.c to handle Y2K dates.

I live on the east coast but the date displays the date as: Wed Aug 30 06:55:36 PDT 2023 Pacific time.

-Ken

On Tue, Aug 29, 2023 at 1:18 PM KenUnix <ken.unix.guy@gmail.com> wrote:
Hi all. I made a couple of changes to 3bsd-dboot.ini so it will do the loading for you:

set tto 7b
set rq dis
set lpt dis
set rl dis
set hk dis
set rq dis
set rqb dis
set rqc dis
set rqd dis
set ry dis
set ts dis
set tq dis
set dz 7b
set dz lines=16
att dz -m 2311
set rp0 rp06
at rp0 rp06.disk
set tu0 te16
D 30000 00009FDE
D 30004 D0512001
D 30008 D004A101
D 3000C 0400C113
D 30010 10008F32
D 30014 D40424C1
D 30018 8FD00CA1
D 3001C 80000000
D 30020 320800C1
D 30024 A1FE008F
D 30028 28C1D410
D 3002C 14C1D404
D 30030 C139D004
D 30034 c1d00400
D 30038 e1500404
D 3003C 00f75007
go 30000                           <-- Change below this line and note "go 2" has moved
expect "Boot" send "hp(0,0)vmunix\r";c
expect "#" send "\004\r";c
go 2

Enjoy...

On Mon, Aug 28, 2023 at 7:03 PM Phil Budne <phil@ultimate.com> wrote:
I got curious, and decided to try booting the 3bsd tape image:
> http://sourceforge.net/projects/bsd42/files/Install%20tapes/3%20BSD/3bsd.tap.bz2/download

I didn't try building anything

Install instructions viewable (once installed, or from
https://www.tuhs.org/Archive/Distributions/UCB/3bsd.tar.gz) via:

nroff -ms /usr/doc/vmunix/newsetup.t

================ 3bsd-tboot.ini

set tto 7b
; from https://gunkies.org/wiki/Installing_32V_on_SIMH#tboot.ini
set rq dis
set lpt dis
set rl dis
set hk dis
set rq dis
set rqb dis
set rqc dis
set rqd dis
set ry dis
set ts dis
set tq dis
set dz lines=8
set rp0 rp06
at rp0 rp06.disk
set tu0 te16
at tu0 3bsd.tap
D 30000 20009FDE
D 30004 D0512001
D 30008 3204A101
D 3000C C113C08F
D 30010 A1D40424
D 30014 008FD00C
D 30018 C1800000
D 3001C 8F320800
D 30020 10A1FE00
D 30024 00C139D0
D 30028 04c1d004
D 3002C 07e15004
D 30030 0000f750
go 30000
go 0

================ installing from tape

$ ./simh/BIN/vax780 3bsd-tboot.ini

VAX 11/780 simulator Open SIMH V4.1-0 Current        git commit id: 348f5f29
/media/INTERNAL/SCRATCH/3bsd/3bsd-tboot.ini-17> at tu0 3bsd.tap
%SIM-INFO: TU0: Tape Image '3bsd.tap' scanned as SIMH format

HALT instruction, PC: 00030033 (HALT)
=mkfs
file sys size: 7942
file system: hp(0,0)
isize = 5072
m/n = 3 500
=restor
Tape? ht(1,1)
Disk? hp(0,0)
Last chance before scribbling on disk. <RETURN>
End of tape
=boot

Boot
: hp(0,0)vmunix
61856+61008+70120 start 0x4B4
VM/UNIX (Berkeley Version 2.7) 2/10/80
real mem  = 8323072
avail mem = 8062976
ERASE IS CONTROL-H!!!
# ps ax
   PID TTY TIME COMMAND
     0 ?   0:17 swapper
     1 ?   0:00 init.vm
     2 ?   0:00 pagedaemon
     3 co  0:00 - (sh)
     7 co  0:00 ps ax
# vmstat
         Procs  Virtual Real         Page        Swap      Disk             Cpu
RQ DW PW SL SW   AVM TX  FRE  RE PI PO FR  DE  SR I O  D0 D1 D2  CS US NI SY ID
 0  0  0  3  0    80 5515518   0  0  0  0   0 0.0 0 0   0  0  0   0  0  0  0100
# chk /dev/rrp0a
icheck /dev/rrp0a
/dev/rrp0a:
files    154 (r=112,d=12,b=8,c=22)
used    1078 (i=28,ii=0,iii=0,d=1050)
free    6545
missing    0
dcheck /dev/rrp0a
/dev/rrp0a:
     entries  link cnt
1       0       0
# /etc/mkfs /dev/rrp0g 145673
isize = 65488
        (or 43147 on RM03)
m/n = 3 500
# /etc/mount /dev/rp0g /usr
# cd /usr
# cp /dev/rmt5 /dev/null
# cp /dev/rmt5 /dev/null
# tar xvbf 20 /dev/rmt1
x ./adm/msgbuf, 0 bytes, 0 tape blocks
....

# dd if=/usr/mdec/uboot of=/dev/rrp0a bs=1b count=1
1+0 records in
1+0 records out

# passwd root
.....
# sync
# sync
# sync
# <CTRL/E>
simh> quit

================ 3bsd-dboot.ini

; from https://gunkies.org/wiki/Installing_32V_on_SIMH#dboot.ini
; (just removed attach tu0)
set tto 7b
set rq dis
set lpt dis
set rl dis
set hk dis
set rq dis
set rqb dis
set rqc dis
set rqd dis
set ry dis
set ts dis
set tq dis
set dz 7b
set dz lines=16
att dz -m 2311
set rp0 rp06
at rp0 rp06.disk
set tu0 te16
D 30000 00009FDE
D 30004 D0512001
D 30008 D004A101
D 3000C 0400C113
D 30010 10008F32
D 30014 D40424C1
D 30018 8FD00CA1
D 3001C 80000000
D 30020 320800C1
D 30024 A1FE008F
D 30028 28C1D410
D 3002C 14C1D404
D 30030 C139D004
D 30034 c1d00400
D 30038 e1500404
D 3003C 00f75007
go 30000
go 2

================ boot from disk

$ ./simh/BIN/vax780 3bsd-dboot.ini

VAX 11/780 simulator Open SIMH V4.1-0 Current        git commit id: 348f5f29
/media/INTERNAL/SCRATCH/3bsd/3bsd-dboot.ini-15> att dz -m 2311
%SIM-INFO: Listening on port 2311
Modem control activated

HALT instruction, PC: 00030040 (HALT)

Boot
: hp(0,0)vmunix
61856+61008+70120 start 0x4B4
VM/UNIX (Berkeley Version 2.7) 2/10/80
real mem  = 8323072
avail mem = 8062976
ERASE IS CONTROL-H!!!
# <CTRL/D>
Sat Sep 27 12:51:17 PDT 1980
entering rc
clearing mtab
mounting /usr on /dev/rp0g
preserving Ex temps and clearing /tmp
starting update
starting cron
leaving rc



Virtual VAX/UNIX (Ernie Co-vax)

login:

(was able to log in on console
and tty1 via telnet localhost 2311)


================ shutdown from multi-user

# kill 1
# ERASE IS CONTROL-H!!!
# sync
# sync
# sync
# <CTRL/E>
Simulation stopped, PC: 8000085F (BLBC 80010FA0,8000085F)
sim> q
Goodbye


--
End of line
JOB TERMINATED




--
End of line
JOB TERMINATED