-
Notifications
You must be signed in to change notification settings - Fork 0
DateTimeZoneFactory
github-actions edited this page Apr 7, 2026
·
1 revision
Factory for creating DateTimeZone instances for the Fast Forward Container.
This factory SHALL return a DateTimeZone instance based on configuration, or fallback to the default timezone.
- Full name:
\FastForward\Clock\ServiceProvider\Factory\DateTimeZoneFactory - This class is marked as final and can't be subclassed
- This class is a Final class
See Also:
- https://github.com/php-fast-forward/clock
- https://github.com/php-fast-forward
- https://datatracker.ietf.org/doc/html/rfc2119
Creates a DateTimeZone instance using configuration from the container.
public __invoke(\Psr\Container\ContainerInterface $container): \DateTimeZoneIf the container does not provide a ConfigInterface, or the configuration does not specify a timezone, this method SHALL return a DateTimeZone using the current default timezone.
If the configuration value for DateTimeZone::class is already a DateTimeZone instance, it SHALL be returned as-is. Otherwise, the value SHALL be used as the timezone identifier string.
Parameters:
| Parameter | Type | Description |
|---|---|---|
$container |
\Psr\Container\ContainerInterface | the container from which to retrieve configuration |
Return Value:
the resolved DateTimeZone instance