Do not set the timestamp value using time(), as it will be overwritten