class CarbonTimeZone extendsDateTimeZone
Methods
No description
No description
No description
No description
Cast the current instance into the given class.
Create a CarbonTimeZone from mixed input.
Returns abbreviated name of the current timezone according to DST setting.
No description
Get the offset as string "sHH:MM" (such as "+00:00" or "-12:30").
Returns a new CarbonTimeZone object using the offset string instead of region string.
Returns the first region string (such as "America/Toronto") that matches the current timezone or false if no match is found.
Returns a new CarbonTimeZone object using the region string instead of offset string.
Cast to string (get timezone name).
Return the type number:
Create a CarbonTimeZone from int/float hour offset.
Create a CarbonTimeZone from int/float minute offset.
Convert a total minutes offset into a standardized timezone offset string.
Details
at line22
__construct($timezone =null)
at line27
staticprotected
parseNumericTimezone($timezone)
at line36
staticprotected
getDateTimeZoneNameFromMixed($timezone)
at line53
staticprotected
getDateTimeZoneFromName($name)
at line65
DateTimeZone
cast(string$className)
Cast the current instance into the given class.
at line88
staticfalse|CarbonTimeZone
instance(DateTimeZone|string|int|null$object =null,DateTimeZone|string|int|null$objectDump =null)
Create a CarbonTimeZone from mixed input.
at line122
string
getAbbreviatedName(bool$dst =false)
Returns abbreviated name of the current timezone according to DST setting.
at line146
string
getAbbr(bool$dst =false)
at line158
string
toOffsetName(DateTimeInterface$date =null)
Get the offset as string "sHH:MM" (such as "+00:00" or "-12:30").
at line172
CarbonTimeZone
toOffsetTimeZone(DateTimeInterface$date =null)
Returns a new CarbonTimeZone object using the offset string instead of region string.
at line188
string|false
toRegionName(DateTimeInterface$date =null,int$isDst =1)
Returns the first region string (such as "America/Toronto") that matches the current timezone or false if no match is found.
at line230
CarbonTimeZone|false
toRegionTimeZone(DateTimeInterface$date =null)
Returns a new CarbonTimeZone object using the region string instead of offset string.
at line250
string
__toString()
Cast to string (get timezone name).
at line262
getType()
Return the type number:
Type 1; A UTC offset, such as -0300 Type 2; A timezone abbreviation, such as GMT Type 3: A timezone identifier, such as Europe/London
at line274
staticfalse|CarbonTimeZone
create(DateTimeZone|string|int|null$object =null)
Create a CarbonTimeZone from mixed input.
at line286
staticfalse|CarbonTimeZone
createFromHourOffset(float$hourOffset)
Create a CarbonTimeZone from int/float hour offset.
at line298
staticfalse|CarbonTimeZone
createFromMinuteOffset(float$minuteOffset)
Create a CarbonTimeZone from int/float minute offset.
at line310
staticstring
getOffsetNameFromMinuteOffset(float$minutes)
Convert a total minutes offset into a standardized timezone offset string.