[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: difference in seconds between two formatted dates ...



On Mon, Dec 18, 2023 at 02:07:14PM +0100, tomas@tuxteam.de wrote:
> I'm still amazed the OP hasn't understood that "date" can output
> custom formats -- and that it's not always possible to parse back
> a date in some custom format into a meaningful timestamp.

unicorn:~$ date +"On this the %dth day of the %mth month of the year %Y (Common Era), at %M minutes past the %Hth hour"
On this the 18th day of the 12th month of the year 2023 (Common Era), at 15 minutes past the 08th hour
unicorn:~$ date -d "$(date +"On this the %dth day of the %mth month of the year %Y (Common Era), at %M minutes past the %Hth hour")"
date: invalid date ‘On this the 18th day of the 12th month of the year 2023 (Common Era), at 15 minutes past the 08th hour’

WHAT DO YOU MEAN INVALID DATE, YOU JUST PRODUCED IT!!

Yeah, I know, it's ridiculous... but this seems to be the level of
discourse required to get through to Albretch.


Reply to: