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
225
Problem with displaying DateTimeOffset values
posted

Hello,

We use the DateTimeOffset class to persist date/time values in our software. On the client (usually in a XamDataGrid) we would like to have the time displayed as a local time without the offset. To do that I used the following XAML-Code:

<igDP:Field Name="CreatedOn"
            Label="{l:LocText Erowa.EMC:Terms:CreatedOn}" >
    <igDP:Field.Settings>
        <igDP:FieldSettings>
            <igDP:FieldSettings.EditorStyle>
                <Style TargetType="igEditors:XamDateTimeEditor">
                    <Setter Property="Format" Value="G" />
                </Style>
            </igDP:FieldSettings.EditorStyle>
        </igDP:FieldSettings>
    </igDP:Field.Settings>
</igDP:Field>

Now I have a problem when the persisted DateTimeOffset values are stored with different time-offsets. It looks like the offset is simply ignored what results in wrong displayed timestamps.

What can I do to get the correct timestamps?

Regards,
Martin

Parents Reply Children
No Data