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
unfortunately I didn't manage to add test case to reproduce the bug.