Skip to content

Commit 50f38df

Browse files
committed
Change format of datetime
1 parent 2c5564a commit 50f38df

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -71,10 +71,10 @@ $ fosslight_binary -p [path_to_analyze]
7171
```
7272
$ tree
7373
.
74-
├── binary_20210601_20_16_46.txt
75-
├── fosslight_bin_log_20210601_20_16_46.txt
76-
├── FOSSLight-Report_20210601_20_16_46.csv
77-
└── FOSSLight-Report_20210601_20_16_46.xlsx
74+
├── binary_20210601_201646.txt
75+
├── fosslight_bin_log_20210601_201646.txt
76+
├── FOSSLight-Report_20210601_201646.csv
77+
└── FOSSLight-Report_20210601_201646.xlsx
7878
7979
```
8080
- FOSSLight-Report_[datetime].xlsx : FOSSLight binary result in OSS Report format.

src/fosslight_binary/binary_analysis.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ def init(path_to_find_bin, output_dir, output_file_name):
4747
if not path_to_find_bin.endswith(os.path.sep):
4848
_root_path += os.path.sep
4949
output_dir = os.path.abspath(output_dir)
50-
_start_time = datetime.now().strftime('%Y%m%d_%H_%M_%S')
50+
_start_time = datetime.now().strftime('%Y%m%d_%H%M%S')
5151

5252
if output_file_name != "":
5353
result_report = output_file_name
@@ -194,7 +194,7 @@ def print_result_log(success=True, result_log={}, file_cnt="", bin_file_cnt="",
194194
else:
195195
start_time = ""
196196
result_log["Running time"] = start_time + " ~ " + \
197-
datetime.now().strftime('%Y-%m-%d_%H-%M-%S')
197+
datetime.now().strftime('%Y%m%d_%H%M%S')
198198
result_log["Execution result"] = 'Success' if success else 'Error occurred'
199199
result_log["Binaries / Scanned files"] = bin_file_cnt + " / " + file_cnt
200200
result_log["Identified in Binary DB / Binaries"] = auto_bin_cnt + \

0 commit comments

Comments
 (0)