{"action":"created","issue":{"url":"https://api.github.com/repos/emoncms/emoncms/issues/199","labels_url":"https://api.github.com/repos/emoncms/emoncms/issues/199/labels{/name}","comments_url":"https://api.github.com/repos/emoncms/emoncms/issues/199/comments","events_url":"https://api.github.com/repos/emoncms/emoncms/issues/199/events","html_url":"https://github.com/emoncms/emoncms/issues/199","id":31991655,"number":199,"title":"daily phpfina feeds off 1 day","user":{"login":"gloorung","id":3314612,"avatar_url":"https://avatars.githubusercontent.com/u/3314612?v=3","gravatar_id":"","url":"https://api.github.com/users/gloorung","html_url":"https://github.com/gloorung","followers_url":"https://api.github.com/users/gloorung/followers","following_url":"https://api.github.com/users/gloorung/following{/other_user}","gists_url":"https://api.github.com/users/gloorung/gists{/gist_id}","starred_url":"https://api.github.com/users/gloorung/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gloorung/subscriptions","organizations_url":"https://api.github.com/users/gloorung/orgs","repos_url":"https://api.github.com/users/gloorung/repos","events_url":"https://api.github.com/users/gloorung/events{/privacy}","received_events_url":"https://api.github.com/users/gloorung/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/emoncms/emoncms/labels/bug","name":"bug","color":"fc2929"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":24,"created_at":"2014-04-22T17:08:46Z","updated_at":"2015-03-21T03:22:01Z","closed_at":null,"body":"Daily stats using the phpfina engine are logged with yesterday's date as the timestamp. MySQL feeds are logged on the correct date. \r\n\r\nWhen looking at the update operator in PHPFina.php, I noticed on line 135 that the timestamp is updated using floor(timestamp/interval)*interval but the interval value for daily feeds corresponds to 86400s or 24h which makes that the timestamp is always 1 day in the past. \r\n\r\nI'm not familiar with how realtime data is best stored, but rounding to the nearest integer would in this case do the trick.\r\n\r\nGloorung"},"comment":{"url":"https://api.github.com/repos/emoncms/emoncms/issues/comments/84232006","html_url":"https://github.com/emoncms/emoncms/issues/199#issuecomment-84232006","issue_url":"https://api.github.com/repos/emoncms/emoncms/issues/199","id":84232006,"user":{"login":"chaveiro","id":4527135,"avatar_url":"https://avatars.githubusercontent.com/u/4527135?v=3","gravatar_id":"","url":"https://api.github.com/users/chaveiro","html_url":"https://github.com/chaveiro","followers_url":"https://api.github.com/users/chaveiro/followers","following_url":"https://api.github.com/users/chaveiro/following{/other_user}","gists_url":"https://api.github.com/users/chaveiro/gists{/gist_id}","starred_url":"https://api.github.com/users/chaveiro/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/chaveiro/subscriptions","organizations_url":"https://api.github.com/users/chaveiro/orgs","repos_url":"https://api.github.com/users/chaveiro/repos","events_url":"https://api.github.com/users/chaveiro/events{/privacy}","received_events_url":"https://api.github.com/users/chaveiro/received_events","type":"User","site_admin":false},"created_at":"2015-03-21T03:22:01Z","updated_at":"2015-03-21T03:22:01Z","body":"Fixed on https://github.com/emoncms/emoncms/pull/303"}}