linux bash - Parse date in custom format

后端 未结 4 897
挽巷
挽巷 2020-12-07 01:19

I have a date in a the %c format (could be any other) and I need to use it in the date command. %c is NOT the American format. It is the G

4条回答
  •  醉梦人生
    2020-12-07 01:46

    Why don't you store the time as unixtime (ie milliseconds since 1st of january 1970) Like 1388198714?

    The requested exercise in trying to parse all date formats from all around the world as a one shot bash script without reasonable dependecies is slightly ridiculous.

提交回复
热议问题