Skip to content

Conversation

@OttiaDevsPT
Copy link
Collaborator

No description provided.

Copy link
Collaborator

@kotivuori kotivuori left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

With these changes timestamp is "0001-01-01T00:00:00.000Z". More useful implementation would be for example DateTime.UtcNow.ToString("yyyy-MM-ddTHH:mm:ss.fffZ") which results in current UTC timestamp.

@obetsak
Copy link

obetsak commented Apr 10, 2025

From the side where we are consuming the information it would be mutch better if you would use DateTimeOffset rater then DateTime. Since we consume the time information on different plattforms with different timezones and where the offset depending on timezone is different depending on the time of the year. We can offcource assume that it is UTC and convert from DateTime to DateTimeOffset before converting to local time but it would be better if we didn't have to.

Copy link
Collaborator

@kotivuori kotivuori left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This doesn't add the requested offset.
DateTimeOffset.Now.ToString("yyyy-MM-dd'T'HH:mm:ss.fffzzz") gets the desired result.

@kotivuori kotivuori merged commit 54b94a6 into main May 19, 2025
@kotivuori kotivuori deleted the PP6-119-Fix-Timestamp branch May 19, 2025 05:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants