utils: Handle datetime objects in shorttime/shortdate