Skip to content

Utilities.ToExpandoObject() changes DateTime values of Entity #404

@Demonofpower

Description

@Demonofpower

I get a Entity from the database and want to change some specific values of it.

image

When I now change a value (I don´t even have to change a value it is enough to just call ServiceClient.Update(Entity)) something strange occurs.
image

My DateTime columns automatically get set 2 hours to the past. Eg. 12.12.2012 12:00 -> 12.12.2012 10:00 or even worse without time 12.12.2012 -> 11.12.2012 (I think because internally the time is 00:00)

I tried to find the cause of the problem and I was able to pin it down to the internal Utilities.ToExpandoObject() method.
When the entity is converted to the ExpandoObject the DateTime variables get changed.

image
image

Inside entity.Attributes:
image

Inside rootExpando:
image

Is this a bug in the internal implementation or did I do somehing wrong?
Thank you very much

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions