You are here

public static function Carbon::createFromTimestamp in Persian Date for Drupal 8 8.4

Create a Carbon instance from a timestamp.

Parameters

int $timestamp:

\DateTimeZone|string|null $tz:

Return value

static

4 calls to Carbon::createFromTimestamp()
Carbon::maxValue in src/Library/Carbon/Carbon.php
Create a Carbon instance for the greatest supported date.
Carbon::minValue in src/Library/Carbon/Carbon.php
Create a Carbon instance for the lowest supported date.
jDateTime::createCarbonFromFormat in src/Library/Jalali/jDateTime.php
jDateTime::createDateTime in src/Library/Jalali/jDateTime.php

File

src/Library/Carbon/Carbon.php, line 613

Class

Carbon
A simple API extension for DateTime

Namespace

Drupal\persian_date\Library\Carbon

Code

public static function createFromTimestamp($timestamp, $tz = null) {
  return static::now($tz)
    ->setTimestamp($timestamp);
}