Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions ApplicationInsights/Channel/Contracts/Utils.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
<?php
namespace ApplicationInsights\Channel\Contracts;

use Carbon\Carbon;

/**
* Contains utilities for contract classes
*/
Expand Down Expand Up @@ -87,11 +89,11 @@ public static function returnISOStringForTime($time = null)
{
if ($time == NULL)
{
return gmdate('c') . 'Z';
return Carbon::now()->toISOString();
}
else
{
return gmdate('c', $time) . 'Z';
return str_replace("Z", "0Z", Carbon::createFromTimestamp($time)->toISOString());
}
}

Expand Down
3 changes: 2 additions & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,8 @@
"license": "MIT",
"require": {
"php": "^7.3|^8.0",
"guzzlehttp/guzzle": "^7.0.1"
"guzzlehttp/guzzle": "^7.0.1",
"nesbot/carbon": "^2.66"
},
"require-dev": {
"phpunit/phpunit": "^9.0",
Expand Down