adding datetime to string and seg fault