joindin/joindin-api — pull request #91 by cvuorinen (2014-07-12 19:23:10+00:00)
Title: Dbgen date improvements

Improve timestamp generation in dbgen script to be more realistic instead of completely random:

1. Generate talk dates that fall between the parent event start and end time.
2. Generate event comment dates that are within two days after previous comment (or parent event start date if no prev comments).
3. Generate talk comment dates that are within two days after previous comment (or parent talk date if no prev comments).

Also fixes "set the correct ordering of comments (earliest comments should be added to the database first)." in https://github.com/joindin/joindin-api/blob/master/tools/dbgen/README.md#future
Although this fix is only per event (for event comments) or per talk (for talk comments). I don't know if there is any reason this should be enforced in a way that all comments are inserted in order. For event comments the original website shows them without ordering so previously they were not in order, but this at least is now fixed with this PR.