# Copyright (C) 2002 Ensim Corporation. All Rights Reserved.
#

F_display_tz()
{
    more -c  $KSGENDIR/lib/data/tz.dat
}

F_read_tz()
{
    echo ""
    _q_tz="US/Pacific"
    echo "> Default timezone for the installed system is US/Pacific"
    F_ckyorn "y" "> Is this choice correct?"
    if [ $_q_yorn = "y" ]
    then
        return
    fi

    echo ""
    echo "> Please enter the number corresponding to the desired time zone for"
    echo "  the installed system."
    echo ""
    echo -n "  Press <ENTER> to view a list of choices ..."
    read _q_dummy
    echo ""
    _q_tz=""
    local _N_tz=`wc -l $KSGENDIR/lib/data/tz.dat | awk '{print $1}'`
    while [ X"$_q_tz" = X"" ] || [ $_q_tz -lt 1 ] || [ $_q_tz -gt $_N_tz ]
    do
        echo ""
        F_display_tz
        echo -n "Timezone [Default is 1 (US/Pacific)]: "
        read _q_tz
        if [ X"$_q_tz" = X"" ]
        then
            _q_tz=1
            break
        fi
        _q_tz=`echo $_q_tz | $AWK '/^[0-9]+$/ {print}'`
    done
    _q_tz=`head -$_q_tz $KSGENDIR/lib/data/tz.dat | tail -1 | awk '{print $2}'`
    return
}

# __END__
