Commit d51dbdef by Félicie

local hour added

parent 0d624d73
...@@ -51,7 +51,8 @@ class CagetteInventory(models.Model): ...@@ -51,7 +51,8 @@ class CagetteInventory(models.Model):
with open(os.path.join(r, file)) as json_file: with open(os.path.join(r, file)) as json_file:
file_data = json.load(json_file) file_data = json.load(json_file)
date_time = datetime.fromtimestamp(int(filename)) local_tz = pytz.timezone('Europe/Paris')
date_time = datetime.fromtimestamp(int(filename), local_tz)
d = date_time.strftime("%d/%m/%Y, %H:%M") d = date_time.strftime("%d/%m/%Y, %H:%M")
file_data['id'] = int(filename) file_data['id'] = int(filename)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment