Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
1145
Time within Date column 1 hour ahead
posted

Versioin 14.2.20142.2477

We have a hierarchical grid, one of the parent columns is defined as

dsLastUpdateDate: { key: 'dsLastUpdateDate', headerText: 'Last Update', width: '135px', dataType: "date", format: 'date', formatter: lastUpdateDate }

the key dsLastUpdateDate provides a string based date value in local time.

it is possible to expand rows to reveal child details, one column within the child grid is defined as:

{ key: 'dsLastUpdateDate', headerText: 'Last Update', width: '135px', dataType: "date", format:'date', hidden: false, formatter: lastUpdateDate },

The key dsLastUpdateDate provides a string based date value in local time.

The formatter is shared and defined as 

function lastUpdateDate(value) {
return moment(value).format('L HH:mm:ss');
}

The issue is the child column is displaying an incorrect value, it is display the time plus 1 hour. This corresponds to taking the value provided as UTC and converting to local (which for me is currently UTC+1).

If I change the child column definition to

{ key: 'dsLastUpdateDate', headerText: 'Last Update', width: '135px', dataType: "string", hidden: false, formatter: lastUpdateDate },

the value is displayed correctly.

Any suggestions as to why this would occur. I have ensured that the underlying values provided by the key properties are correct.

Regards

Aidan