Changeset 4131
- Timestamp:
- 02/19/09 20:22:07 (4 years ago)
- Files:
-
- 1 modified
-
trunk/umitCore/Scheduler.py (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/umitCore/Scheduler.py
r4129 r4131 28 28 import warnings 29 29 import subprocess 30 from datetime import datetime 30 31 from ConfigParser import ConfigParser 31 32 … … 47 48 servicemanager = lambda: None 48 49 servicemanager.RunningAsService = lambda: False 50 51 52 def format_asctime(date): 53 """Format a datetime.date almost like time.asctime, except this one 54 doesn't use ':' for the time so it can be used as a filename under 55 Windows.""" 56 return datetime.strftime(date, '%a %b %d %Hh%Mm%Ss %Y') 49 57 50 58 … … 684 692 server = smtp['server'] 685 693 port = smtp['port'] 686 curr_time = time.ctime()694 curr_time = format_asctime(datetime.now()) 687 695 orig_output = scan.get_xml_output_file() 688 696 new_file_output = os.path.join( 689 697 os.path.dirname(orig_output), 690 curr_time + "-" + opts[3])698 "%s (%s)" % (curr_time, opts[3])) 691 699 692 700 fd_wcont = open(new_file_output, 'w')
