added local time helper function
got correct local time