UserSearch.php
public function gmdate($attribute, $params, $validator)
    {
        if (isset($this->$attribute)) {
            $timestamp = strtotime($this->$attribute);
            $this->{$attribute . 'InUtc'} = gmdate('Y-m-d H:i:s', $timestamp);
        }
    }
public function gmdate($attribute, $params, $validator)
    {
        if (isset($this->$attribute)) {
            $timestamp = strtotime($this->$attribute);
            $this->{$attribute . 'InUtc'} = gmdate('Y-m-d H:i:s', $timestamp);
        }
    }
public function gmdate ( $ attribute , $ params , $ validator ) { if ( isset ( $ this -> $ attribute ) ) { $ timestamp = strtotime ( $ this -> $ attribute ) ; $ this -> { $ attribute . 'InUtc' } = gmdate ( 'Y-m-d H:i:s' , $ timestamp ) ; } }
Convert time attribute to UTC time.
@param string $attribute
@param array $params
@param mixed $validator
Convert time attribute to UTC time .