Commit d10b9bd7 authored by Gabriel Detraz's avatar Gabriel Detraz
Browse files

Fix avec dateutil pour formatage dates

parent e3d7070a
......@@ -8,6 +8,7 @@ import re, os
import time
import datetime
import urllib2
import dateutil.parser
from intranet import settings
from django.db import models
from django import forms
......@@ -93,7 +94,7 @@ class Jobs(models.Model):
def valid_from_job(self, result, endtime):
self.endtime = time.strftime("%F %T",
time.strptime(endtime, "%Y %b. %d %H:%M:%S"))
enddate = dateutil.parser.parse(endtime)
self.endtime = time.strftime("%F %T", enddate.timetuple())
self.lastcheck = time.time()
self.result = result
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