Ionic App -IOS local time issue -but working fine in android!

Hi,

I’ve an issue on my ionic app. My app is a barcode scanning system which ends up in sign in and signs out. After sign in it shows sign in time which is showing the correct local time in android but showing wrong time in iOS as difference in 5 hours. I tried UTC time conversion as well as date formatting, but still failing.

Thanks in advance for your support.

try with ----import * as moment from ‘moment’;

Thanks Renjith.

I’ve tried this before, but no change in value.Please find the code below.

return (date.getMonth() + 1) + “/” + date.getDate() + “/” + date.getFullYear() + " " + moment(date.getHours()) + “:” + moment(date.getMinutes());