Same name and namespace in other branches
- 8.9.x core/modules/system/src/Plugin/migrate/process/d6/TimeZone.php \Drupal\system\Plugin\migrate\process\d6\TimeZone::transform()
- 9 core/modules/system/src/Plugin/migrate/process/d6/TimeZone.php \Drupal\system\Plugin\migrate\process\d6\TimeZone::transform()
File
- core/
modules/ system/ src/ Plugin/ migrate/ process/ d6/ TimeZone.php, line 19
Class
Namespace
Drupal\system\Plugin\migrate\process\d6Code
public function transform($value, MigrateExecutableInterface $migrate_executable, Row $row, $destination_property) {
$offset = $value;
// Convert the integer value of the offset (which can be either
// negative or positive) to a timezone name.
// Note: Daylight saving time is not to be used.
$timezone_name = timezone_name_from_abbr('', intval($offset), 0);
if (!$timezone_name) {
$timezone_name = 'UTC';
}
return $timezone_name;
}