fixed timestamp code