diff --git a/lib/Segment/Client.php b/lib/Segment/Client.php
index <HASH>..<HASH> 100644
--- a/lib/Segment/Client.php
+++ b/lib/Segment/Client.php
@@ -139,11 +139,17 @@ class Segment_Client {
    */
   private function formatTime($ts) {
     // time()
-    if ($ts == null) $ts = time();
-    if (is_integer($ts)) return date("c", $ts);
-
-    // anything else return a new date.
-    if (!is_float($ts)) return date("c");
+    if ($ts == null || !$ts) $ts = time();
+    if (filter_var($ts, FILTER_VALIDATE_INT) !== false) return date("c", (int) $ts);
+
+    // anything else try to strtotime the date.
+    if (filter_var($ts, FILTER_VALIDATE_FLOAT) === false) {
+      if (is_string($ts)) {
+        return date("c", strtotime($ts));
+      } else {
+        return date("c");
+      }
+    }
 
     // fix for floatval casting in send.php
     $parts = explode(".", (string)$ts);
- fixes #<I>
- instead of using just is_int and is_float for checking timestamp, use filter_var since that can detect string ints and floats
- if its not a string or float, consider it might be a ISO<I> or some other string, so use strtotime() to support other strings