Skip to content

Conversation

JessieWadman
Copy link
Contributor

Handles DateTimeOffset as a primitive, the same way as DateTime is currently handled. It serializes the offset in minutes, instead of DateTimeKind. The offset can be +/- 720 minutes, so a signed short has been used.

@Horusiath
Copy link
Contributor

@JessieWadman I think, you could go straightforward and serialize it as combination of DateTime part as ticks (one long) and TimeSpan offset ticks (another long). This will save possible problems in the future.

@JessieWadman
Copy link
Contributor Author

@Horusiath You mean in case someone decides to create a DateTimeOffset with +40 hours or something?

@Horusiath
Copy link
Contributor

@JessieWadman I'm thinking here more about time zone component used with precision to milliseconds or less.

@JessieWadman
Copy link
Contributor Author

You're right, of course. As far as I know, all time zones are expressed in hours only, with the exception of three(?) that are some hours and 30 or 45 minute offset. Nevertheless, since the DateTimeOffset structure can express offset in ticks, it's not for us to misplace those along the way.

@Horusiath Horusiath merged commit 5686a73 into akkadotnet:dev Dec 7, 2017
@Aaronontheweb Aaronontheweb added this to the Hyperion v0.9.7 milestone Jan 18, 2018
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.

3 participants