add timestampTolocaltime functions in js