Les timestamps dans l'historique contiennent des secondes
This commit is contained in:
parent
1969b7909b
commit
f3186853ec
1 changed files with 5 additions and 5 deletions
|
@ -407,7 +407,7 @@ class Service:
|
|||
starting = self.start
|
||||
starting.sort()
|
||||
dates = u' et '.join(map(lambda t: t < time.time() and \
|
||||
u"maintenant" or time.strftime(date_format,
|
||||
u"maintenant" or time.strftime(date_format_new,
|
||||
time.localtime(t)),
|
||||
self.start))
|
||||
dates = u" à partir d%s %s" % (dates.startswith(u"maintenant") and u"e" or u"u",
|
||||
|
@ -1353,7 +1353,7 @@ class BaseClasseCrans(CransLdap):
|
|||
modif = ', '.join(liste_historique)
|
||||
|
||||
timestamp = time.localtime()
|
||||
hist = "%s, %s" % ( time.strftime(date_format, timestamp), script_utilisateur )
|
||||
hist = "%s, %s" % ( time.strftime(date_format_new, timestamp), script_utilisateur )
|
||||
|
||||
if self.modifs.has_key('derniereConnexion'):
|
||||
# On nettoie l'historique pour ne garder que la dernière modification
|
||||
|
@ -1365,7 +1365,7 @@ class BaseClasseCrans(CransLdap):
|
|||
# On loggue
|
||||
try:
|
||||
fd = file('%s/%s_%s_%s' % ("%s/logs" % config.cimetiere, str(self.__class__).split('.')[-1],
|
||||
time.strftime('%Y-%m-%d-%H:%M', timestamp), self.nom()), 'wb')
|
||||
time.strftime('%Y-%m-%d-%H:%M:%S', timestamp), self.nom()), 'wb')
|
||||
fd.write("%s\n" % self._data)
|
||||
fd.close()
|
||||
except:
|
||||
|
@ -1456,12 +1456,12 @@ class BaseClasseCrans(CransLdap):
|
|||
# Sauvegarde
|
||||
t = str(self.__class__).split('.')[-1]
|
||||
fd = open('%s/%s/%s_%s' % (config.cimetiere, t,
|
||||
time.strftime('%Y-%m-%d-%H:%M'),
|
||||
time.strftime('%Y-%m-%d-%H:%M:%S'),
|
||||
self.nom()), 'wb')
|
||||
self.conn = None # Fermeture des connexions à la base sinon cPickle ne marchera pas
|
||||
cPickle.dump(self, fd, 2)
|
||||
fd.close()
|
||||
index = u"%s, %s : %s %s # %s\n" % (time.strftime(date_format),
|
||||
index = u"%s, %s : %s %s # %s\n" % (time.strftime(date_format_new),
|
||||
script_utilisateur, t,
|
||||
self.Nom(), decode(comment))
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue