<p>I always use unix timestamps for everything, but am wondering if there is a better way.</p>

<p>What do you use to store timestamps and why?</p>

32 bit Unix timestamps will overflow in a few years (January 2038)
, so that might be a consideration. I generally use a DATETIME format in SQL, which is YYYY-MM-DD HH:MM:SS with the time as a 24-hour clock. I try to output to files in the same format, just to make my life easier.