db generated timestamps, improved timer and alarm