Skip to content

Commit 2f78897

Browse files
committed
SafariHistory Timezone support
safariHistory timezone support
1 parent c8c284a commit 2f78897

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

scripts/artifacts/safariHistory.py

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
import textwrap
1010

1111
from scripts.artifact_report import ArtifactHtmlReport
12-
from scripts.ilapfuncs import logfunc, tsv, timeline, is_platform_windows, open_sqlite_db_readonly
12+
from scripts.ilapfuncs import logfunc, tsv, timeline, is_platform_windows, open_sqlite_db_readonly, convert_ts_human_to_utc, convert_utc_human_to_timezone
1313

1414
def get_safariHistory(files_found, report_folder, seeker, wrap_text, timezone_offset):
1515
for file_found in files_found:
@@ -60,6 +60,9 @@ def get_safariHistory(files_found, report_folder, seeker, wrap_text, timezone_of
6060

6161
if usageentries > 0:
6262
for row in all_rows:
63+
timestamp = convert_ts_human_to_utc(row[0])
64+
timestamp = convert_utc_human_to_timezone(timestamp, timezone_offset)
65+
6366
redirect_source = ''
6467
redirect_destination = ''
6568
if str(row[4]) is None:
@@ -75,7 +78,7 @@ def get_safariHistory(files_found, report_folder, seeker, wrap_text, timezone_of
7578
if str(row[5]) == key:
7679
redirect_destination = value
7780

78-
data_list.append((row[0], row[1], textwrap.fill(row[2], width=100), row[3], textwrap.fill(redirect_source, width=100), textwrap.fill(redirect_destination, width=100), row[6], row[7]))
81+
data_list.append((timestamp, row[1], textwrap.fill(row[2], width=100), row[3], textwrap.fill(redirect_source, width=100), textwrap.fill(redirect_destination, width=100), row[6], row[7]))
7982

8083
description = ''
8184
report = ArtifactHtmlReport('Safari Browser - History')
@@ -101,4 +104,4 @@ def get_safariHistory(files_found, report_folder, seeker, wrap_text, timezone_of
101104
"Safari Browser",
102105
('**/Safari/History.db*'),
103106
get_safariHistory)
104-
}
107+
}

0 commit comments

Comments
 (0)