grizli.utils.ctime_to_iso(mtime, format='%a %b %d %H:%M:%S %Y', strip_decimal=True, verbose=True)[source]

Convert time.ctime strings to ISO dates

mtime : str

Time string, generally as output from time.ctime, e.g., 'Mon Sep 16 11:23:27 2019'

format : str

datetime.strptime format string, codes at https://www.programiz.com/python-programming/datetime/strptime

strip_decimal : bool

Strip decimal seconds from end of ISO string

verbose : bool

Print a message if conversion fails

iso : str

String in (sortable) ISO format, e.g., '2019-09-16 11:23:27.000'