ID EN
Datetime

combine

Python 3.11

Return a new datetime object whose date components are equal to the given date object’s, and whose time components are equal to the given time object’s. If the tzinfo argument is provided, its value is used to set the tzinfo attribute of the result, otherwise the tzinfo attribute of the time argument is used.

Syntax

PYTHON
classmethod datetime.combine(date, time, tzinfo=self.tzinfo)

See Also

datetime date time tzinfo tzinfo datetime datetime tzinfo