Commit d10b9bd7 authored by Gabriel Detraz's avatar Gabriel Detraz

Fix avec dateutil pour formatage dates

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