Skip to content

TimeZone

Properties

name

protected \Qubus\ValueObjects\StringLiteral\StringLiteral $name

Methods

__construct

Returns a new TimeZone object.

public __construct(\Qubus\ValueObjects\StringLiteral\StringLiteral $name): mixed

Parameters:

Parameter Type Description
$name \Qubus\ValueObjects\StringLiteral\StringLiteral

Throws:


__toString

Returns timezone name as string.

public __toString(): string

fromNative

Returns a new Time object from native timezone name.

public static fromNative(): \Qubus\ValueObjects\DateTime\TimeZone|\Qubus\ValueObjects\ValueObject
  • This method is static.

Throws:


fromNativeCarbonTimeZone

Returns a new Time from a native PHP \DateTime.

public static fromNativeCarbonTimeZone(\Carbon\CarbonTimeZone $timezone): \Qubus\ValueObjects\DateTime\TimeZone|\Qubus\ValueObjects\ValueObject
  • This method is static.

Parameters:

Parameter Type Description
$timezone \Carbon\CarbonTimeZone

Throws:


fromDefault

Returns default TimeZone.

public static fromDefault(): \Qubus\ValueObjects\DateTime\TimeZone|\Qubus\ValueObjects\ValueObject
  • This method is static.

Throws:


toNativeCarbonTimeZone

Returns a native CarbonTimeZone version of the current TimeZone.

public toNativeCarbonTimeZone(): \Carbon\CarbonTimeZone

Throws:


equals

Tells whether two DateTimeZone are equal by comparing their names.

public equals(\Qubus\ValueObjects\ValueObject|\Qubus\ValueObjects\DateTime\TimeZone $timezone): bool

Parameters:

Parameter Type Description
$timezone \Qubus\ValueObjects\ValueObject|\Qubus\ValueObjects\DateTime\TimeZone

getName

Returns timezone name.

public getName(): \Qubus\ValueObjects\StringLiteral\StringLiteral


Automatically generated on 2025-10-13