CronExpressionTimezoneConverter
class CronExpressionTimezoneConverter (View source)
Methods
Convert an event cron expression to the display timezone.
Resolve the timezone used by the given event.
Get offset components between the event and display timezones.
Build expressions for the given hour carry direction.
Shift values in a cron field and group them by carry direction.
Shift a cron field by the given offset.
Details
static string[]
forEvent(Event $event, DateTimeZone $timezone)
Convert an event cron expression to the display timezone.
Returns one or more expressions when values straddle a day boundary.
static protected DateTimeZone
resolveEventTimezone(Event $event, DateTimeZone $defaultTimezone)
Resolve the timezone used by the given event.
static protected
offsetComponents(DateTimeZone $eventTimezone, DateTimeZone $displayTimezone)
Get offset components between the event and display timezones.
static protected array<int,string>
expressionsForHourCarry(array $segments, array $parts, int $hourCarry)
Build expressions for the given hour carry direction.
static protected array<int,string>
shiftAndGroup(string $field, int $offset, int $mod, $min = 0)
Shift values in a cron field and group them by carry direction.
static protected string
shiftField(string $field, int $offset, int $mod, int $min = 0)
Shift a cron field by the given offset.