Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
O
OpenXG-SMF
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
OpenXG
OpenXG-SMF
Commits
1489e80a
Commit
1489e80a
authored
Jul 23, 2021
by
Fang-WANG
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add time in json
parent
a5d8fcac
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
0 deletions
+7
-0
src/smf_app/smf_app.cpp
src/smf_app/smf_app.cpp
+7
-0
No files found.
src/smf_app/smf_app.cpp
View file @
1489e80a
...
...
@@ -1311,6 +1311,13 @@ bool smf_app::handle_nf_status_notification(
for
(
auto
address
:
nfIpv4Addresses
)
{
json_data
[
"ipv4Addresses"
].
push_back
(
inet_ntoa
(
address
));
}
time_t
rawtime
;
struct
tm
*
info
;
char
buffer
[
80
];
time
(
&
rawtime
);
info
=
localtime
(
&
rawtime
);
strftime
(
buffer
,
80
,
"%Y-%m-%d %H:%M:%S"
,
info
);
json_data
[
"time"
]
=
buffer
;
my_json
json_data_arr
=
nlohmann
::
json
::
array
();
json_data_arr
.
push_back
(
json_data
);
...
...
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