Setting timestamp correctly