Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Stored a tons of useless data in the minutes table #26

Open
fdesanto opened this issue Jul 18, 2018 · 0 comments
Open

Stored a tons of useless data in the minutes table #26

fdesanto opened this issue Jul 18, 2018 · 0 comments

Comments

@fdesanto
Copy link

Hi,
for example a event with:
startdate: 2016-01-01 12:10
endate: 2016-01-03 12:10

will store in minute table all values for

  • 2016-01-01 h12 (this is correct because in the hour table I have -1)
  • 2016-01-01 h13 (this is wrong because I already have the value in hour table for h13)
  • 2016-01-01 h14 (this is wrong because I already have the value in hour table for h14)
  • 2016-01-01 h15 (this is wrong because I already have the value in hour table for h15)
  • 2016-01-01 h16 (this is wrong because I already have the value in hour table for h16)
    ......
  • 2016-01-01 h23 (this is wrong because I already have the value in hour table for h23)
  • 2016-01-03 h0 (this is wrong because I already have the value in hour table for h0)
  • 2016-01-03 h1 (this is wrong because I already have the value in hour table for h1)
  • 2016-01-03 h2 (this is wrong because I already have the value in hour table for h2)
    ......
  • 2016-01-03 h11 (this is wrong because I already have the value in hour table for h11)
  • 2016-01-03 h12 (this is correct because in the hour table I have -1)

Something like this will store in minute table 25 rows instead only 2 rows

the problem is into file event/EventItemizer.php, now to fix it I have added following code at line 304
unset($itemized[EventItemizer::BAT_MINUTE][$year][$month]['d' . $day]['h' . $hour]);
This line remove all useless data in minute table when the value is already stored in hour table.

Regards

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant