fixed trouble with timestamps (from and to db)