Benson Muite <[email protected]> writes:

>> I realize that I should have used a better example after sending my
>> mail. Sorry about that.
>>
>> I agree that using /etc/localtime would be reasonable in the case I
>> sent, which does not have a date given with the --date option. However,
>> I'm not sure how a case like this would be handled:
>>
>>    $ date --rfc-9557=minutes --date='2026-01-01T12:00-07:00'
>>
>> Since we don't have any information about the time zone beyond the UTC
>> offset in that case.
>
> If the UTC offset is all that is available, one should not return a time
> zone. One should output an error that the IANA time zone has not been
> set on that machine and so cannot be determined. If the UTC offset is
> available, one could give a choice of time zones to select as the IANA
> database will likely be already installed, and then ask for one to run
>
>    $ TZ=America/Los_Angeles date --rfc-9557=minutes \
>      --date='2026-01-01T12:00-7:00'

Hi Benson, I added [email protected] back to CC so others can see your
proposal and comment.

Collin

Reply via email to