def timestamp_pack(x, seconds_in_day=seconds_in_day, pg_epoch_datetime=
    pg_epoch_datetime):
    """
	Create a (seconds, microseconds) pair from a `datetime.datetime` instance.
	"""
    x = x - pg_epoch_datetime
    return x.days * seconds_in_day + x.seconds, x.microseconds
