fix bug where Event-Timestamp cannot write to buffer because date.getTime()/1000 is not an integer