orbitx.utils._date_utils.sec_since_change_ref

orbitx.utils._date_utils.sec_since_change_ref#

orbitx.utils._date_utils.sec_since_change_ref(date: float, ref_date_old: datetime, ref_date_new: datetime) float[source]#

sec_since_change_ref Converts a date in seconds since reference date format to a seconds since a different date

Parameters:
  • date (float) – The date to be converted, as a float representing the number of seconds since the former reference date

  • ref_date_old (datetime.datetime) – The old reference date to be converted from

  • ref_date_new (datetime.datetime) – The new reference date to be converted to

Returns:

The date converted, as a float representing the number of seconds since the new reference date

Return type:

float