function correctDFPTimeZoneId( DfpDateTime $datetime )
{
$timezone_replacements = [
'CST6CDT' => 'America/Chicago',
'Cuba' => 'Etc/GMT-5',
'Egypt' => 'Etc/GMT+2',
'Eire' => 'UTC',
'EST5EDT' => 'America/New_York',
'Factory' => 'UTC',
'GB-Eire' => 'UTC',
'GMT0' => 'UTC',
'Greenwich' => 'UTC',
'Hongkong' => 'Etc/GMT+8',
'Iceland' => 'UTC',
'Iran' => 'Etc/GMT+3',
'Israel' => 'Etc/GMT+2',
'Jamaica' => 'Etc/GMT-5',
'Japan' => 'Etc/GMT+9',
'Kwajalein' => 'Etc/GMT+12',
'Libya' => 'Etc/GMT+2',
'MST7MDT' => 'Etc/GMT-7',
'Navajo' => 'Etc/GMT-7',
'NZ-CHAT' => 'Etc/GMT+12',
'Poland' => 'Etc/GMT+1',
'Portugal' => 'UTC',
'PST8PDT' => 'America/Los_Angeles',
'Singapore' => 'Etc/GMT+8',
'Turkey' => 'Etc/GMT+2',
'Universal' => 'UTC',
'W-SU' => 'Etc/GMT+4'
];
if ( isset( $timezone_replacements[ $datetime->timeZoneID ] ) )
{
$datetime->timeZoneID = $timezone_replacements[ $datetime->timeZoneID ];
}
return $datetime;
}