public function Carbon::modify in Persian Date for Drupal 8 8.4
Consider the timezone when modifying the instance.
Parameters
string $modify:
Return value
static
15 calls to Carbon::modify()
- Carbon::addDays in src/
Library/ Carbon/ Carbon.php - Add days to the instance. Positive $value travels forward while negative $value travels into the past.
- Carbon::addHours in src/
Library/ Carbon/ Carbon.php - Add hours to the instance. Positive $value travels forward while negative $value travels into the past.
- Carbon::addMinutes in src/
Library/ Carbon/ Carbon.php - Add minutes to the instance. Positive $value travels forward while negative $value travels into the past.
- Carbon::addMonthsNoOverflow in src/
Library/ Carbon/ Carbon.php - Add months without overflowing to the instance. Positive $value travels forward while negative $value travels into the past.
- Carbon::addMonthsWithOverflow in src/
Library/ Carbon/ Carbon.php - Add months to the instance. Positive $value travels forward while negative $value travels into the past.
File
- src/
Library/ Carbon/ Carbon.php, line 3327
Class
- Carbon
- A simple API extension for DateTime
Namespace
Drupal\persian_date\Library\CarbonCode
public function modify($modify) {
if ($this->local) {
return parent::modify($modify);
}
$timezone = $this
->getTimezone();
$this
->setTimezone('UTC');
$instance = parent::modify($modify);
$this
->setTimezone($timezone);
return $instance;
}