parse_time function:

Parse a date/time from a string into seconds since epoc The first argemnt should be the date The second argemnt should be the format as string See details in https://docs.rs/chrono/latest/chrono/format/strftime/index.html.

Examples:

  • running: (parse_time " 3-Dec-2023 - 13:51:55.360", "%v - %T%.3f") will give: 1701611515.36

  • running: (parse_time "2023 Dec 3 13:51:55.360 +0500", "%Y %b %d %H:%M:%S%.3f %z") will give: 1701611515.36

  • running: (parse_time " 3-Dec-2023 - 13:51:55.360", 122) will return nothing

  • running: (parse_time {}, "%v - %T%.3f") will return nothing