Audited entities (PrimaryEntity, ResultEntity and AssociatedRecord) includes CreatedUtc and ModifiedUtc, which cannot be changed by the user.
We ignore leap seconds and use the Gregorian calendar.
The following rules must be followed when creating columns for storing date and time:
Local date, i.e. extracted from the client browser.
(no conversion done on backend)
Local date and time with offset.
(no conversion done on the backend)
UTC date and time, typically machine generate, i.e. not from user input.
(shifted to UTC, i.e. removing the offset)
(assume already converted)
The data type can be left out, and the data type are automatically set based on the rules above. If a column is prefixed with the above, an error is thrown if the Data type is not set correctly.
Special column: date
If you add a column dateCreated, this will be set automatically when saving using the Scifeon client in the browser, unless you as a developer explicitly set it.
Use CreatedUtc or ModifiedUtc when showing times of related entities (e.g. for messaging).
Calculate differences between comparable columns, e.g. date* and utc* have different formats, and no guarantees on being saved with the same offset.
Consider whether you need a date(time) column for an entity, or if you can use the Event-entity instead.