From 8e44ab253266fdc86cd2ba4c9ab67455e24b8580 Mon Sep 17 00:00:00 2001 From: bernat Date: Thu, 14 Oct 2004 11:02:37 +0200 Subject: [PATCH] On s'arrange pour avoir la meme heure dans l'historique et dans la sauvegarde des donnes darcs-hash:20041014090237-d1718-a046d8417bf98e314253a1d63fe82174766b44c8.gz --- gestion/ldap_crans.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/gestion/ldap_crans.py b/gestion/ldap_crans.py index 946bcc5e..2ecdb4e8 100755 --- a/gestion/ldap_crans.py +++ b/gestion/ldap_crans.py @@ -757,13 +757,14 @@ class base_classes_crans(crans_ldap) : modif='inscription' else : modif=', '.join(self.modifs) - - hist = "%s, %s" % ( time.strftime(date_format), script_utilisateur ) + + timestamp = localtime() + hist = "%s, %s" % ( time.strftime(date_format, timestamp), script_utilisateur ) # 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'), self.nom()),'wb') + time.strftime('%Y-%m-%d-%H:%M', timestamp), self.nom()),'wb') fd.write("%s\n" % self._data) fd.close() except: