Updated TP date functions