- classmethod craftutils.observation.epoch.Time.strptime(time_string, format_string, **kwargs)
Parse a string to a Time according to a format specification. See time.strptime documentation for format specification.
>>> Time.strptime('2012-Jun-30 23:59:60', '%Y-%b-%d %H:%M:%S') <Time object: scale='utc' format='isot' value=2012-06-30T23:59:60.000>Parameters¶
- time_stringstr, sequence, or ndarray
Objects containing time data of type string
- format_stringstr
String specifying format of time_string.
- kwargsdict
Any keyword arguments for
Time. If theformatkeyword argument is present, this will be used as the Time format.
Returns¶
- time_obj~astropy.time.Time
A new ~astropy.time.Time object corresponding to the input
time_string.