Have timeanddate() change timestamp-looking timestampts to YYYYMMDDHH24MISS integer...
[lhc/web/wiklou.git] / languages / Language.php
index a23c304..db24767 100644 (file)
@@ -753,6 +753,12 @@ class Language {
        */
        function timeanddate( $ts, $adj = false, $format = true, $timecorrection = false) {
                $this->load();
+
+               ## Account for non-integer timestamps
+               if (substr($ts,4,1) === '-') {
+                       $ts = preg_replace('/\D/', '', $ts);
+               }
+
                if ( $adj ) { 
                        $ts = $this->userAdjust( $ts, $timecorrection ); 
                }