From 4e85bc66b8a5f5347ae15dda229f028d31b58469 Mon Sep 17 00:00:00 2001 From: redmatrix Date: Wed, 21 Sep 2016 17:16:54 -0700 Subject: function to check for different values of NULL_DATE for backward compatibility --- include/datetime.php | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'include') diff --git a/include/datetime.php b/include/datetime.php index 76bd6b8d6..914eac95e 100644 --- a/include/datetime.php +++ b/include/datetime.php @@ -24,6 +24,13 @@ function timezone_cmp($a, $b) { return ( t($a) < t($b)) ? -1 : 1; } +function is_null_date($s) { + if($s === '0000-00-00 00:00:00' || $s === '0001-01-01 00:00:00') + return true; + return false; +} + + /** * @brief Return timezones grouped (primarily) by continent. * -- cgit v1.2.3