make timestamps mongo compatible