I agree that it might be nice in some situations to have a format that
specified the exact time as well as the day.
So, unless you truncate it, the granularity of the timing is in the
daystamp variable.
As proposed, an approximation of the timing to the second is in the
daystamp variable. Since the number of seconds since the epoch is a 9 digit
number, the proposed calculations should be generated as doubles; otherwise
applying this transformation and its inverse will not yield the original
timestamp. A second off here, a second off there, and averages or other
summary stats based on these calculations will be imprecise.