Page MenuHomePhabricator

D16326.diff
No OneTemporary

D16326.diff

diff --git a/src/applications/search/field/PhabricatorSearchDateField.php b/src/applications/search/field/PhabricatorSearchDateField.php
--- a/src/applications/search/field/PhabricatorSearchDateField.php
+++ b/src/applications/search/field/PhabricatorSearchDateField.php
@@ -35,6 +35,14 @@
return null;
}
+ // If this appears to be an epoch timestamp, just return it unmodified.
+ // This assumes values like "2016" or "20160101" are "Ymd".
+ if (is_int($value) || ctype_digit($value)) {
+ if ((int)$value > 30000000) {
+ return (int)$value;
+ }
+ }
+
return PhabricatorTime::parseLocalTime($value, $this->getViewer());
}

File Metadata

Mime Type
text/plain
Expires
Fri, Dec 20, 2:51 AM (20 h, 43 m)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
6909279
Default Alt Text
D16326.diff (676 B)

Event Timeline