public function offsetSet($name, $value)
    {
        parent::offsetSet($name, $value);
        if ('VALUE' !== strtoupper($name)) {
            return;
        }

        // This will ensure that dates are correctly encoded.
        $this->setDateTimes($this->getDateTimes());
    }
public function offsetSet($name, $value)
    {
        parent::offsetSet($name, $value);
        if ('VALUE' !== strtoupper($name)) {
            return;
        }

        // This will ensure that dates are correctly encoded.
        $this->setDateTimes($this->getDateTimes());
    }
public function offsetSet ( $ name , $ value ) { parent :: offsetSet ( $ name , $ value ) ; if ( 'VALUE' !== strtoupper ( $ name ) ) { return ; } // This will ensure that dates are correctly encoded. $ this -> setDateTimes ( $ this -> getDateTimes ( ) ) ; }
We need to intercept offsetSet, because it may be used to alter the
VALUE from DATE-TIME to DATE or vice-versa.

@param string $name
@param mixed  $value
We need to intercept offsetSet because it may be used to alter the VALUE from DATE - TIME to DATE or vice - versa .