fixed bugs on adding new column to db
fixes a few database bugs, added time offsets