2705,2730c2705,2716 < switch ($func) { < case 'time': < $valueArr = explode(':', $value); < $value = $valueArr[0] * 3600 + $valueArr[1] * 60; < break; < case 'timesec': < $valueArr = explode(':', $value); < $value = $valueArr[0] * 3600 + $valueArr[1] * 60 + $valueArr[2]; < break; < case 'date': < case 'datetime': < // ISO 8601 dates < $dateTime = new \DateTime($value); < // The returned timestamp is always UTC < $value = $dateTime->getTimestamp(); < < // $value is a UTC timestamp here. < // The value will be stored in the server’s local timezone, but treated as UTC, so we brute force < // subtract the offset here. The offset is subtracted instead of added because the value is stored < // in the timezone, but interpreted as UTC, so if we switched the server to UTC, the correct < // value would be returned. < if ($value !== 0 && !$this->dontProcessTransformations) { < $value -= date('Z', $value); < } < break; < } --- > // ISO 8601 dates > $dateTime = new \DateTime($value); > // The returned timestamp is always UTC > $value = $dateTime->getTimestamp(); > } > // $value is a UTC timestamp here. > // The value will be stored in the server’s local timezone, but treated as UTC, so we brute force > // subtract the offset here. The offset is subtracted instead of added because the value is stored > // in the timezone, but interpreted as UTC, so if we switched the server to UTC, the correct > // value would be returned. > if ($value !== 0 && !$this->dontProcessTransformations) { > $value -= date('Z', $value);