Timezone in Database


#1

Hello! I’m just starting to get involved with Piwik, and am planning on building a web app involving portions of the data it generates.

Hopefully I will be able to contribute back to the community as I explore the Piwik universe!


First question, it appears to me that dates are stored in the database in the UTC timezone and all timezone settings simply convert the dates on the fly when displayed. I understand the reasoning for this, and the flexibility it provides as far as allowing users to change their timezone at any point.

The issue I have is that when selecting date ranges from the database it means I have to first take the input, convert it to UTC, run the sql query, convert back to PST, and then display the data.

While obviously this isn’t a huge deal, I wanted to check and make sure there isn’t a setting I couldn’t switch to make the SQL date in a local timezone.

Thanks! And thanks for all of the development so far, I will definitely be buying you some beers soon.

Dustin B