@lru_cache()
def time_to_days(value):
 if (value.tzinfo is not None):
  value = value.astimezone(UTC)
 return (((((value.hour * 3600) + (value.minute * 60)) + value.second) + (value.microsecond / (10 ** 6))) / SECS_PER_DAY)

@ lru_cache ( ) def time_to_days ( value ) : if ( value . tzinfo is not None ) : value = value . astimezone ( UTC ) return ( ( ( ( ( value . hour * 3600 ) + ( value . minute * 60 ) ) + value . second ) + ( value . microsecond / ( 10 ** 6 ) ) ) / SECS_PER_DAY )
convert a time value to fractions of day .