pbspark/_timestamp.py
def _to_datetime(message: Timestamp) -> datetime.datetime:
    """Convert a Timestamp to a python datetime."""
    return well_known_types._EPOCH_DATETIME_NAIVE + datetime.timedelta(  # type: ignore[attr-defined]
        seconds=message.seconds,
        microseconds=well_known_types._RoundTowardZero(  # type: ignore[attr-defined]
            message.nanos,
            well_known_types._NANOS_PER_MICROSECOND,  # type: ignore[attr-defined]
        ),
    )
Convert a Timestamp to a python datetime.
Convert a Timestamp to a python datetime.
Convert a Timestamp to a python datetime .
def _to_datetime(message: Timestamp) -> datetime.datetime:
    return well_known_types._EPOCH_DATETIME_NAIVE + datetime.timedelta(  
        seconds=message.seconds,
        microseconds=well_known_types._RoundTowardZero(  
            message.nanos,
            well_known_types._NANOS_PER_MICROSECOND,  
        ),
    )
def _to_datetime ( message : Timestamp ) -> datetime . datetime : return well_known_types . _EPOCH_DATETIME_NAIVE + datetime . timedelta ( seconds = message . seconds , microseconds = well_known_types . _RoundTowardZero ( message . nanos , well_known_types . _NANOS_PER_MICROSECOND , ) , )
Convert a Timestamp to a python datetime.
Convert a Timestamp to a python datetime .
"""Convert a Timestamp to a python datetime.""" # type: ignore[attr-defined] # type: ignore[attr-defined] # type: ignore[attr-defined]
message
Timestamp