intercom / intercom-dotnet

Intercom API client library for .NET
https://developers.intercom.io/reference
Apache License 2.0
63 stars 53 forks source link

Why are created_at and signed_up_at on the User class nullable ints and not longs? #46

Closed julipur closed 7 years ago

khalilovcmd commented 7 years ago

Thank you for your question @julipur

Int32.Max in .NET is 2147483647. The current time since epoch is 1478623294. We will only reach the Int32.Max in year 2038.

I think it will be more accurate if we have it as UInt32.

julipur commented 7 years ago

So as long as I cast it down, I'm good. Thanks.

khalilovcmd commented 7 years ago

@julipur Yes 👍 but it might throw an Exception if you try and cast a larger value that could be fit into an Int32. It all depends on your casting method.