Hello i'm trying to obtain an datetime object with "T" and "Z" so i can pass it to youtube API. After i convert it the STRPTIME can't match the format and i don't understand why, i have tried all day to get rid of this.
actual_time = datetime.utcnow()
actual_time = actual_time.isoformat("T") +"Z"
actual_time = datetime.strptime(actual_time, '%y-%m-%dT%H:%M:%S.%f%z')
print(actual_time)
This is the error i get:
raise ValueError("time data %r does not match format %r" %
time data '2022-09-03T09:52:49.464164Z' does not match format '%y-%m-%dT%H:%M:%S.%f%z'