Time
class Time
Time helper class
Methods
static datetime
toSqlDateTime(integer $time = null)
Take a timestamp and return a properly formatted SQL datetime string
static object
fromSqlTime(datetime $time)
Take a SQL DateTime and return a Carbon DT object
static object
fromUnixTime(datetime $time)
Take a Unix Timestamp and return a Carbon DT object
static object
fromString($time = 'now', $format = null)
Get a Carbon DT object for a given time and format
static object
fromLocalString($time = 'now', $format = null)
Get a Carbon DT object for a given time and format in local time
Details
at line 19
static datetime
toSqlDateTime(integer $time = null)
Take a timestamp and return a properly formatted SQL datetime string
at line 37
static object
fromSqlTime(datetime $time)
Take a SQL DateTime and return a Carbon DT object
at line 50
static object
fromUnixTime(datetime $time)
Take a Unix Timestamp and return a Carbon DT object
at line 60
static object
fromString($time = 'now', $format = null)
Get a Carbon DT object for a given time and format
at line 74
static object
fromLocalString($time = 'now', $format = null)
Get a Carbon DT object for a given time and format in local time