time-env-set 1 user commands nosh
time-env-set time-env-set-if-earlier time-env-set-if-later time-env-unset-if-earlier time-env-unset-if-later time-env-unset-if-null-or-later set environment variables to external TAI64N timestamps
`time-env-set` var timestamp next-prog `time-env-set-if-earlier` var timestamp next-prog `time-env-set-if-later` var timestamp next-prog `time-env-unset-if-earlier` var timestamp next-prog `time-env-unset-if-later` var timestamp next-prog `time-env-unset-if-null-or-later` var timestamp next-prog

## Description

`time-env-set`, `time-env-set-if-earlier`, `time-env-set-if-later`, `time-env-unset-if-earlier`, `time-env-unset-if-later`, and `time-env-unset-if-null-or-later` parse timestamp to yield a TAI64N time. They then set or unset the environment variable `var`, and then chain load to next-prog with the execvp 3 function.

- `time-env-set` sets the variable to the timestamp for that time.

- `time-env-set-if-earlier` sets the variable to the timestamp for that time if, after parsing the variable's existing value as a timestamp, the timestamp time is earlier than the existing value or the existing value is null.

- `time-env-set-if-later` sets the variable to the timestamp for that time if, after parsing the variable's existing value as a timestamp, the timestamp time is later than the existing value or the existing value is null.

- `time-env-unset-if-earlier` unsets the variable if, after parsing the variable's existing value as a timestamp, the timestamp time is non-null and is earlier than the existing value.

- `time-env-unset-if-later` unsets the variable if, after parsing the variable's existing value as a timestamp, the timestamp time is non-null and is later than the existing value.

- `time-env-unset-if-null-or-later` unsets the variable if, after parsing the variable's existing value as a timestamp, the timestamp time is null or is later than the existing value.

next-prog may contain its own command line options, which these commands will ignore.

The format of timestamp is as explained in the manual for time-print-tai64n 1. The environment variable value, when set, is always set to the `@hexdigits` 24-character TAI64N external form.

## Author

Jonathan de Boyne Pollard