add a flag to use local time rather than UTC