create timestamp() function for time storage
Implement time storage properly for database