Skip to content

Commit

Permalink
Force UTC times, always!
Browse files Browse the repository at this point in the history
  • Loading branch information
turbo124 committed Jun 9, 2020
1 parent 3aaa3e6 commit 97157e5
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
2 changes: 2 additions & 0 deletions src/Collector.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ public function __construct()

public function create($metric)
{
date_default_timezone_set('UTC');

$this->metric = $metric;
$this->metric->datetime = date("Y-m-d H:i:s");

Expand Down
5 changes: 3 additions & 2 deletions src/Generator.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,12 @@ class Generator
*/
private function endPoint($uri)
{
return config('beacon.endpoint')."/{$uri}/batch";
return config('beacon.endpoint') . "/{$uri}/batch";
}

private function alertEndPoint()
{
return config('beacon.endpoint')."/alert";
return config('beacon.endpoint') . "/alert";
}
/**
* The API key used to communicate with
Expand Down Expand Up @@ -104,6 +104,7 @@ public function batchFire($metric_array)

} catch (RequestException $e) {

info($e->getMessage());
}

}
Expand Down

0 comments on commit 97157e5

Please sign in to comment.