Skip to content

Commit d8e92eb

Browse files
lauren.wyckofflauren.wyckoff
authored andcommitted
getTimestamp() UTC issue #64
1 parent d329340 commit d8e92eb

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Util.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ public static function getTimestamp() {
7272
$microseconds = sprintf('%06d', ($time - floor($time)) * 1000000);
7373
$millseconds = round($microseconds, -3)/1000;
7474
$millsecondsStr = str_pad($millseconds, 3, '0', STR_PAD_LEFT);
75-
$date = (new \DateTime())->format('c');
75+
$date = (new \DateTime(null, new \DateTimeZone("UTC")))->format('c');
7676

7777
$position = strrpos($date, '+');
7878
$date = substr($date,0,$position).'.'.$millsecondsStr.substr($date,$position);

0 commit comments

Comments
 (0)