- drms.utils.to_datetime(tstr, force=False)¶
Parse JSOC time strings.
In general, this is quite complicated, because of the many different (non-standard) time strings supported by the DRMS. For more (much more!) details on this matter, see Rick Bogart’s notes.
The current implementation only tries to convert typical HMI time strings, with a format like “%Y.%m.%d_%H:%M:%S_TAI”, to an ISO time string, that is then parsed by pandas. Note that “_TAI”, aswell as other timezone indentifiers like “Z”, will not be taken into account, so the result will be a naive timestamp without any associated timezone.
If you know the time string format, it might be better calling pandas.to_datetime() directly. For handling TAI timestamps, e.g. converting between TAI and UTC, the astropy.time package can be used.