Datetime.time will not guidance this, since it's nigh meaningless to subtract situations In this particular method. Use an entire datetime.datetime if you wish to do that. Why do I need to clean flash between distinct Android versions on custom ROMs but not on OEM updates? You may use to_timestamp function https://minus-two-cargo32732.tinyblogging.com/not-known-factual-statements-about-minus-two-cargo-74085798