Hopefully someone will notice what is the cause of the problem I'm experiencing.
For all other time zones, such as Europe / Helsinki, calculating the offset below returns the correct values, but for some reason I get a negative value for time zones of the Etc / GMT + 2 style and vice versa (for example, for Etc / GMT- 2 I get a positive value, 7200).
$dateTimeZone = new DateTimeZone('Etc/GMT+2');
echo $dateTimeZone->getOffset(new DateTime("now", new DateTimezone( 'UTC' )));
Expected: 7200 Result: -7200
Jouko source
share