fixed some sqlite stuff, added custom epoch time