What about storing the UNIX timestamp instead of the datetime object... this solve all problems ..