diff --git a/app/Services/SnowflakeService.php b/app/Services/SnowflakeService.php new file mode 100644 index 00000000..b04c56b4 --- /dev/null +++ b/app/Services/SnowflakeService.php @@ -0,0 +1,18 @@ +parse($ts)->timestamp : microtime(true); + return ((round($ts * 1000) - 1549756800000) << 22) + | (1 << 17) + | (1 << 12) + | 0; + } + +} \ No newline at end of file