fix(ion-datetime): keep the model value consistently an ISO string (#15907)

This commit is contained in:
Ken Sodemann
2018-10-11 16:50:05 -05:00
committed by GitHub
parent fb3b752198
commit b46052bd83
5 changed files with 225 additions and 14 deletions

View File

@ -356,7 +356,7 @@ export function convertDataToISO(data: DatetimeData): string {
} else {
// YYYY-MM-DDTHH:mm:SS+/-HH:mm
rtn += (data.tzOffset > 0 ? '+' : '-') + twoDigit(Math.floor(data.tzOffset / 60)) + ':' + twoDigit(data.tzOffset % 60);
rtn += (data.tzOffset > 0 ? '+' : '-') + twoDigit(Math.floor(Math.abs(data.tzOffset / 60))) + ':' + twoDigit(data.tzOffset % 60);
}
}
}