Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
O
OpnSense
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Kulya
OpnSense
Commits
bd70ec11
Commit
bd70ec11
authored
Apr 22, 2016
by
Ad Schellevis
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
(network insight) export in local time
parent
9c1387f4
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
3 deletions
+4
-3
export_details.py
src/opnsense/scripts/netflow/export_details.py
+4
-3
No files found.
src/opnsense/scripts/netflow/export_details.py
View file @
bd70ec11
...
...
@@ -30,12 +30,11 @@
"""
import
time
import
datetime
from
dateutil.tz
import
tzlocal
import
pytz
import
os
import
sys
import
ujson
sys
.
path
.
insert
(
0
,
"/usr/local/opnsense/site-python"
)
from
lib.parse
import
parse_flow
from
lib.aggregate
import
BaseFlowAggregator
import
lib.aggregates
import
params
...
...
@@ -75,6 +74,8 @@ if valid_params:
if
not
record
[
item
]:
line
.
append
(
""
)
if
type
(
record
[
item
])
==
datetime
.
datetime
:
# dates are stored in utc, return in timezone configured on this machine
record
[
item
]
=
record
[
item
]
.
replace
(
tzinfo
=
pytz
.
utc
)
.
astimezone
(
tzlocal
())
line
.
append
(
'
%
s+00:00'
%
record
[
item
]
.
strftime
(
'
%
Y/
%
m/
%
d
%
H:
%
M:
%
S'
))
elif
type
(
record
[
item
])
==
float
:
line
.
append
(
'
%.4
f'
%
record
[
item
])
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment