Skip to content

Commit

Permalink
Update Time.php
Browse files Browse the repository at this point in the history
  • Loading branch information
drylian authored Apr 17, 2024
1 parent 53b469a commit 1711409
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions app/Helpers/Time.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,6 @@ final class Time
*/
public static function getMySQLTimezoneOffset(string $timezone): string
{
$offset = round(CarbonImmutable::now($timezone)->getTimezone()->getOffset(CarbonImmutable::now('UTC')) / 3600);

return sprintf('%s%s:00', $offset > 0 ? '+' : '-', str_pad((string) abs($offset), 2, '0', STR_PAD_LEFT));
return CarbonImmutable::now($timezone)->getTimezone()->toOffsetName();
}
}

0 comments on commit 1711409

Please sign in to comment.