rewrite utc timestamp requests

This commit is contained in:
Matthew Bucci
2024-10-17 02:54:44 -07:00
parent d0eab624eb
commit a6765201ce
3 changed files with 31 additions and 1 deletions
+2
View File
@@ -68,6 +68,8 @@ class SelectSQLRewriter extends AbstractSQLRewriter
// HANDLE REGEXP
$sql = preg_replace('/REGEXP/', '~', $sql);
$sql = str_replace("utc_timestamp()", "CURRENT_TIMESTAMP AT TIME ZONE 'UTC'", $sql);
// In order for users counting to work...
$matches = array();
if(preg_match_all('/COUNT[^C]+\),/', $sql, $matches)) {