Rev 3808: Use osutils.format_local_date() instead of time.strftime() in http://bzr.arbash-meinel.com/branches/bzr/jam-integration

John Arbash Meinel john at arbash-meinel.com
Thu Oct 30 14:18:38 GMT 2008


At http://bzr.arbash-meinel.com/branches/bzr/jam-integration

------------------------------------------------------------
revno: 3808
revision-id: john at arbash-meinel.com-20081030141826-6267bwt9p372nrsi
parent: john at arbash-meinel.com-20081030005500-r5cej1cxflqhs3io
committer: John Arbash Meinel <john at arbash-meinel.com>
branch nick: jam-integration
timestamp: Thu 2008-10-30 09:18:26 -0500
message:
  Use osutils.format_local_date() instead of time.strftime()
-------------- next part --------------
=== modified file 'bzrlib/trace.py'
--- a/bzrlib/trace.py	2008-10-30 00:55:00 +0000
+++ b/bzrlib/trace.py	2008-10-30 14:18:26 +0000
@@ -246,11 +246,11 @@
     # Do this before we open the log file, so we prevent
     # get_terminal_encoding() from mutter()ing multiple times
     term_encoding = osutils.get_terminal_encoding()
-    start_time = time.strftime('%Y-%m-%d %H:%M:%S\n',
-                               time.localtime(_bzr_log_start_time))
+    start_time = osutils.format_local_date(_bzr_log_start_time,
+                                           timezone='local')
     # create encoded wrapper around stderr
     bzr_log_file = _open_bzr_log()
-    bzr_log_file.write(start_time)
+    bzr_log_file.write(start_time.encode('utf-8') + '\n')
     push_log_file(bzr_log_file,
         r'[%(process)5d] %(asctime)s.%(msecs)03d %(levelname)s: %(message)s',
         r'%Y-%m-%d %H:%M:%S')



More information about the bazaar-commits mailing list