This clearly also needs unit tests failing on current code state, and passing after fixes.
Could you please give me a hint where such test should be placed ?
Also maybe Period/Factory could use some review regarding other possible timezone issues ?
Thanks for pull request. unfortunately I could not reproduce issue yet. Maybe you can help me reproduce issue? see my comment in: http://dev.piwik.org/trac/ticket/5356#comment:1
This was fixed in https://github.com/piwik/piwik/commit/de6104d4491275b2abafd266c5616462286be1e7
unfortunately I didn't manage to add test case to reproduce the bug.