Skip to content
This repository has been archived by the owner on Mar 9, 2024. It is now read-only.

#1390 on CodePlex - Wrong time zone suggestion #7

Closed
lextm opened this issue Aug 1, 2018 · 0 comments
Closed

#1390 on CodePlex - Wrong time zone suggestion #7

lextm opened this issue Aug 1, 2018 · 0 comments
Labels
bug Something isn't working
Milestone

Comments

@lextm
Copy link
Member

lextm commented Aug 1, 2018

Hello,

I'm in Prague,Czech Republic (UTC+1) with correct php datime zone Europe/Belgrade, but PHP Manager suggests me that I should have Asia/Kuwait, which is UTC+3.

The problem seems to be in PhpConfigHelper.GetPHPTimeZone:

if (localZone.IsDaylightSavingTime(currentTime))
{
DaylightTime daylightTime = localZone.GetDaylightChanges(currentTime.Year);

if (offset >= TimeSpan.Zero)
{

offset += daylightTime.Delta;

}

else
{
offset -= daylightTime.Delta;
}
}

I think it should always subtract daylightTime.Delta from offset to get correct UTC offset without dayling saving time. In my case offset would be correctly 1, not 3.

Thank you,
Miloslav
Proposed
#1390 | Created 2012-10-17 | Updated 2013-02-21

@lextm lextm added this to the Release 2.0 milestone Aug 1, 2018
@lextm lextm closed this as completed in cd4858c Aug 1, 2018
@lextm lextm added the bug Something isn't working label Aug 1, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant