Project import generated by Copybara.

GitOrigin-RevId: 63746295f1a5ab5a619056791995793d65529e62
diff --git a/src/inc/common.php b/src/inc/common.php
new file mode 100644
index 0000000..26d02aa
--- /dev/null
+++ b/src/inc/common.php
@@ -0,0 +1,17 @@
+<?php
+class common {
+  public static function getDayTimestamp($originaltime) {
+    $datetime = new DateTime();
+    $datetime->setTimestamp($originaltime);
+
+    $rawdate = $datetime->format("Y-m-d")."T00:00:00";
+    $date = new DateTime($rawdate);
+
+    return $time = $date->getTimestamp();
+  }
+
+  public static function getTimestampFromRFC3339($rfc) {
+    $date = new DateTime($rfc);
+    return (int)$date->getTimestamp();
+  }
+}