Finally managed to solve a long time existing problem with timestamps. I'm having a server on one of the Linode serverfarms. Of course it's in a different timezone.
This difference was visible on the charts unfortunately. When you entered a time between 8pm and 15:59pm the day coming from PHP was proper, but not the day shown on the charts by Javascript. Also the default prefilled time on the entry form was wrong due to the server's timezone. What I had to do is use gmdate() instead if date() in PHP, and fixing the timestamp offsets on the charts by getting the difference between the default and timezone-agnostic timestamps. Also there is an option now to change your user details, such as your name, password - OR - timezone of your location :) You will see an extra user menu on the top right corner:
It leads you to your profile page:
So if setting the timezone will make it sure you get the correct timestamps for the entries all the time :)
Bests,
Peter


No comments:
Post a Comment