Skip to content

Commit

Permalink
Added parsed_at key and value to JSON output
Browse files Browse the repository at this point in the history
  • Loading branch information
cp6 committed Nov 26, 2023
1 parent b686328 commit 87c8a78
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -454,6 +454,7 @@ as JSON:
"total_data_value": 269.77,
"total_data_unit": "GB",
"duration": "00:13:13"
}
},
"parsed_at" : "2023-11-25 20:55:43"
}
```
3 changes: 2 additions & 1 deletion src/NetworkSpeed.php
Original file line number Diff line number Diff line change
Expand Up @@ -221,7 +221,8 @@ public function asJson(): array
'total_data_value' => (float)$totalDataMatches[1],
'total_data_unit' => $totalDataMatches[2],
'duration' => gmdate("H:i:s", ($durationMatches[1] * 60) + $durationMatches[2])
]
],
'parsed_at' => date('Y-m-d H:i:s')
];
}

Expand Down

0 comments on commit 87c8a78

Please sign in to comment.