sonar fixes

This commit is contained in:
jain
2023-07-18 16:56:24 +05:30
parent 5cc43aa2b8
commit 130dcd83e7
6 changed files with 15 additions and 1 deletions

View File

@ -39,6 +39,7 @@ def upload_image_to_alibaba(image, filename):
return f"https://{settings.ALIYUN_OSS_BUCKET_NAME}.{settings.ALIYUN_OSS_ENDPOINT}/{new_filename}"
def real_time():
""" real time """
# Fetch real time.
# time is not depend on system time
# Get the current datetime
@ -49,6 +50,7 @@ def real_time():
return current_datetime
def convert_timedelta_into_datetime(time_difference):
"""convert date time"""
# convert timedelta into datetime format
hours = time_difference.seconds // NUMBER['thirty_six_hundred']
minutes = (time_difference.seconds // NUMBER['sixty']) % NUMBER['sixty']