the date command
Bret Busby
bret.busby at gmail.com
Fri Jun 12 21:26:13 UTC 2020
On 13/06/2020, Bret Busby <bret.busby at gmail.com> wrote:
> On 12/06/2020, Oliver Grawert <ogra at ubuntu.com> wrote:
>> hi,
>>
>> Am Freitag, den 12.06.2020, 12:06 -0400 schrieb Peter Teuben:
>>> it gets the default format from the
>>> > system settings so I suggest you look there.
>>> >
>>> > Colin
>>>
>>> quite possibly i need to reboot then. I see my uptime is 20 days.
>>>
>>
>> the date format is typically handled via the LC_TIME system variable:
>>
>> $ locale | grep LC_TIME
>> LC_TIME="de_DE.UTF-8"
>>
>> ciao
>> oli
>>
>
> Why does
> PS1="\d ..."
> return a different (the USA) date format, to the date format returned by
> the
> date
> command?
>
To clarify; from one of my UbuntuMATE 20.04 systems,
Sat Jun 13 05:23:03 bret at bret-Linux-Aspire-5750G:~$PS1="\d \t \u@\h:\w$"
Sat Jun 13 05:23:09 bret at bret-Linux-Aspire-5750G:~$date
Sat 13 Jun 2020 05:23:14 AWST
Sat Jun 13 05:23:14 bret at bret-Linux-Aspire-5750G:~$
shows how the date is formatted differently, with the PS1 parameter of
\n , not using the locale date format, but,rather, using the USA date
format.
> Is it possible, in any of the formatting of the displayed dates; the
> value returned by the date command, and the \d for the PS1 string, to
> set the displaying format for the date, to be the ISO format
> (yyyy-mm-dd)?
>
> --
> Bret Busby
> Armadale
> West Australia
> ..............
>
--
Bret Busby
Armadale
West Australia
..............
More information about the ubuntu-users
mailing list