this should be outdented by one level.  You need to commit the transaction even if you did not change the timezone of the database .  The query on line 144 opens a transaction and you don't want to leave the connection in an idle transaction state.