mars_time.marstime_to_datetime#

mars_time.marstime_to_datetime(mt: MarsTime) datetime[source]#

Convert a MarsTime to a datetime.

Parameters:

mt (MarsTime) – Any MarsTime.

Returns:

The datetime associated with the input MarsTime.

Return type:

datetime.datetime

Examples

Find the UTC time that corresponds to the start of Mars year 30.

>>> import mars_time
>>> mars_time.marstime_to_datetime(mars_time.MarsTime(30, 0))
datetime.datetime(2009, 10, 26, 14, 58, 33, 600000, tzinfo=datetime.timezone.utc)