#!/bin/rc

rfork en

opts=()
while(! ~ $#* 0 && ~ $1 -* && ! ~ $1 --){
	switch($1){
	case -t
		shift
		zone=/adm/timezone/$1
		if(! test -e $zone){
			echo $zone - file not found
			exit 'not found'
		}
		bind $zone /env/timezone
	case *
		opts=($opts $1)
	}
	shift
}

while(! ~ $#* 0){
	opts=($opts $1)
	shift
}

/$cputype/bin/date $opts
