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 = self.start
|
||||||
starting.sort()
|
starting.sort()
|
||||||
dates = u' et '.join(map(lambda t: t < time.time() and \
|
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)),
|
time.localtime(t)),
|
||||||
self.start))
|
self.start))
|
||||||
dates = u" à partir d%s %s" % (dates.startswith(u"maintenant") and u"e" or u"u",
|
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)
|
modif = ', '.join(liste_historique)
|
||||||
|
|
||||||
timestamp = time.localtime()
|
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'):
|
if self.modifs.has_key('derniereConnexion'):
|
||||||
# On nettoie l'historique pour ne garder que la dernière modification
|
# On nettoie l'historique pour ne garder que la dernière modification
|
||||||
|
@ -1365,7 +1365,7 @@ class BaseClasseCrans(CransLdap):
|
||||||
# On loggue
|
# On loggue
|
||||||
try:
|
try:
|
||||||
fd = file('%s/%s_%s_%s' % ("%s/logs" % config.cimetiere, str(self.__class__).split('.')[-1],
|
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.write("%s\n" % self._data)
|
||||||
fd.close()
|
fd.close()
|
||||||
except:
|
except:
|
||||||
|
@ -1456,12 +1456,12 @@ class BaseClasseCrans(CransLdap):
|
||||||
# Sauvegarde
|
# Sauvegarde
|
||||||
t = str(self.__class__).split('.')[-1]
|
t = str(self.__class__).split('.')[-1]
|
||||||
fd = open('%s/%s/%s_%s' % (config.cimetiere, t,
|
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.nom()), 'wb')
|
||||||
self.conn = None # Fermeture des connexions à la base sinon cPickle ne marchera pas
|
self.conn = None # Fermeture des connexions à la base sinon cPickle ne marchera pas
|
||||||
cPickle.dump(self, fd, 2)
|
cPickle.dump(self, fd, 2)
|
||||||
fd.close()
|
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,
|
script_utilisateur, t,
|
||||||
self.Nom(), decode(comment))
|
self.Nom(), decode(comment))
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue