t = "2021-04-08T01:00:00" def format_time(self,india_time_str, india_format='%Y-%m-%dT%H:%M:%S'): india_dt = datetime.datetime.strptime(india_time_str, india_format) local_dt = india_dt + datetime.timedelta(hours=8) local_format = "%Y-%m-%d %H:%M:%S" time_str = local_dt.strftime(local_format) return time_str