moved eval permission checks to shared func

also set some defaults for the datetime between function