Converting Timezone Strings from database on Select form field the offsets

I have a field which is a timezone stored as Europe/Andorra for example,

            Select::make("timezone_id")
                ->nullable()
                ->preload()
                ->options(
                Timezone::all()->pluck("name","id")->toArray()
                )
                ->searchable(),

Which displays the timezone correctly, but i want to show the offset for it eg Europe/Andorra (GMT+1)
I have this helper which works
<?php
namespace App\Helpers;

use Carbon\Carbon;
class TimezoneHelper
{
    public static function getGMTOffset($timezone)
    {
        $dateTime = Carbon::parse($timezone);
        $offset = $dateTime->offsetHours;
        $sign = ($offset < 0) ? '-' : '+';
        $absOffset = abs($offset);
        $gmtOffset = sprintf("GMT%s%02d", $sign, $absOffset);
        return $gmtOffset;
    }
}
but how do i modify the option labels in the field with that helper?
Thanks in advance
Was this page helpful?