Open PC-BPS opened 4 months ago
Hmm... When dealing with Dates in the SDK, they should always be set as UTC, and retrieved as UTC. What exactly is the conversion logic that you are applying and for which Date field formats? I'm wondering if there is a better approach that can be built in, or maybe an attribute metadata type that can at least be added.
When we create a record prior to 10AM local time. If that record contains a date only field, the value is set to the day before. So in order for the date to be "Today" we have to add 10 hours to it.
It is difficult to identify which fields we need to do this to, we have to go look it up in the solution.
Does this not work?
entity.myDate = DateTime.SpecifyKind(DateTime.Now, DateTimeKind.Utc);
What tool/version is it that you're making a feature request for?
EarlyBoundGenerator
Is your feature request related to a problem? Please describe.
When we try to write code for a mix of DateTimes (TimeZone Independent) and Date Only, we have to check the solution to confirm the type of DateTime before working on it. It is easy to make a mistake and accidentally set something to the UTC Date instead of our own local date (AEST). Records that are created or updated prior to 10am will have the day priors date.
Existing generated field:
Describe the solution you'd like
When the earlybound entities and fields are generated, the comments of the field show that it is either TimeZone Independent or DateOnly. It would be great if it were configurable, so that a custom message could be shown for either situation.
Example:
Describe alternatives you've considered Changing the description of each field that is DateOnly in the solution, so that it shows in the
<summary>
.