Documentation

datetime.from_date_and_time

Return a datetime created using the given arguments in your site's timezone. Year, month, and day are required arguments. Any other argument that is set to None defaults to the value from the current time.

Arguments:

def datetime.from_date_and_time(
  year: <dec, int>,
  month: <dec, int>,
  day: <dec, int>,
  hour: <dec, int> = None,
  minute: <dec, int> = None,
  second: <dec, int> = None,
):

Returns <datetime>.

Example:

# 0:00 on New Years Day, 1995
nyd_long_long_ago = datetime.from_date_and_time(
  year=1995,
  month=1,
  day=1,
  hour=0,
  minute=0,
  second=0)