~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/trace.py

  • Committer: John Arbash Meinel
  • Date: 2008-10-30 14:18:26 UTC
  • mto: (3815.2.5 prepare-1.9)
  • mto: This revision was merged to the branch mainline in revision 3811.
  • Revision ID: john@arbash-meinel.com-20081030141826-6267bwt9p372nrsi
Use osutils.format_local_date() instead of time.strftime()

Show diffs side-by-side

added added

removed removed

Lines of Context:
246
246
    # Do this before we open the log file, so we prevent
247
247
    # get_terminal_encoding() from mutter()ing multiple times
248
248
    term_encoding = osutils.get_terminal_encoding()
249
 
    start_time = time.strftime('%Y-%m-%d %H:%M:%S\n',
250
 
                               time.localtime(_bzr_log_start_time))
 
249
    start_time = osutils.format_local_date(_bzr_log_start_time,
 
250
                                           timezone='local')
251
251
    # create encoded wrapper around stderr
252
252
    bzr_log_file = _open_bzr_log()
253
 
    bzr_log_file.write(start_time)
 
253
    bzr_log_file.write(start_time.encode('utf-8') + '\n')
254
254
    push_log_file(bzr_log_file,
255
255
        r'[%(process)5d] %(asctime)s.%(msecs)03d %(levelname)s: %(message)s',
256
256
        r'%Y-%m-%d %H:%M:%S')