Why does Azure Table Storage have a different DateTime.MinValue limit than .NET.

.NET DateTime.MinValue is 1/1/0001, however Windows Azure Table Storage does not accept this value because it has a different lower limit: CloudTableClient.MinSupportedDateTime .

Why is there such a difference that made the Azure team design it that way? This is something simply problematic, and I believe that there are technical difficulties behind this choice.

+4
source share
1 answer

Most likely, Azure saves these values ​​in a different format than those used by DateTime . This is quite common for systems of types of database systems that differ from the system language of any programming language. Engineering often involves trade-offs, and database developers often make different choices than other tool developers. For example, DateTime uses two bits to store timezone-related data to support a cyclic transition between UTC and local time during daylight saving time. These extra two bits are masked when performing comparisons, hashing, or serialization. I highly doubt that Azure stores such information that it is not needed, and it will only unnecessarily complicate requests.

Unfortunately, I don’t know any reference to the features of how DateTime is stored in Azure, but this MSDN blog mentions both the limited DateTime range, as well as another way in which Azure types are more limited than the .NET equivalents - String and byte[] limited to 64 KB.

+4
source

All Articles