none
Development Storage changing dates RRS feed

  • Question

  • I've just updated to the October 2012 release. It appears that the development storage fabric has some interesting new behavior around dates. If you write a date to storage that is equal-to-or-earlier-than 1753-01-01T00:00:00, it will work fine and the response from storage will have that date. But when you retrieve the entity from storage the date will have magically changed to 01-01-01T00:00:00. 

    I've checked in Fiddler, and it appears to be the dev storage emulator that is changing the dates. It's not the client library reading it wrong or anything like that. I've attached a text version of that Fiddler capture - pay attention to the <d:Updated> property.

    I'm guessing this is just one of those dev storage bugs I'll have to work around for testing, but it would be nice if there was a fix somewhere.

    Fiddler Capture:

    POST http://127.0.0.1:10002/devstoreaccount1/CommentTable HTTP/1.1
    User-Agent: Microsoft ADO.NET Data Services
    DataServiceVersion: 1.0;NetFx
    MaxDataServiceVersion: 2.0;NetFx
    x-ms-date: Tue, 13 Nov 2012 18:23:33 GMT
    Authorization: SharedKeyLite devstoreaccount1:HleAOg00i5YKDBbWB736gTV/e8HArWVbJqE7onsZ5MI=
    x-ms-version: 2012-02-12
    Accept: application/atom+xml,application/xml
    Accept-Charset: UTF-8
    Content-Type: application/atom+xml
    Host: 127.0.0.1:10002
    Content-Length: 1718
    
    <?xml version="1.0" encoding="utf-8"?>
    <entry xmlns:d="http://schemas.microsoft.com/ado/2007/08/dataservices" xmlns:m="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata" xmlns="http://www.w3.org/2005/Atom">
      <title />
      <author>
        <name />
      </author>
      <updated>2012-11-13T18:23:33.0147763Z</updated>
      <id />
      <content type="application/xml">
        <m:properties>
          <d:AttachmentHasThumbnail m:type="Edm.Boolean" m:null="true" />
          <d:AttachmentId m:null="true" />
          <d:AttachmentInfoXml m:null="true" />
          <d:AttachmentType m:type="Edm.Int32">0</d:AttachmentType>
          <d:AuthorId>c086e046-0047-41f5-a982-557a8807e47c</d:AuthorId>
          <d:Comment>shots ring out as the doorlock is destroyed, and the door to the office opens. Enter Bat Guano, brandishing an M-1 carbine.</d:Comment>
          <d:CommentId>c057c667-f04d-4b72-ada1-66dbeab97575</d:CommentId>
          <d:EncryptionVersion m:type="Edm.Int32">0</d:EncryptionVersion>
          <d:IsDeleted m:type="Edm.Boolean">false</d:IsDeleted>
          <d:LikedByUsers>6d64a67f-ed52-451c-8540-00b00a8955d5</d:LikedByUsers>
          <d:Link m:null="true" />
          <d:Location>31.51097,-118.85442</d:Location>
          <d:LocationName>Skipwith, yC</d:LocationName>
          <d:PartitionKey>f6a66b85-afb0-4409-958d-9124259dc09d</d:PartitionKey>
          <d:PubDate m:type="Edm.DateTime">2012-11-10T21:33:32.1107763Z</d:PubDate>
          <d:RowKey>2520497175878892236</d:RowKey>
          <d:StatusId>f6a66b85-afb0-4409-958d-9124259dc09d</d:StatusId>
          <d:Timestamp m:type="Edm.DateTime">0001-01-01T00:00:00</d:Timestamp>
          <d:Updated m:type="Edm.DateTime">1753-01-01T00:00:00</d:Updated>
        </m:properties>
      </content>
    </entry>
    HTTP/1.1 201 Created
    Cache-Control: no-cache
    Content-Type: application/atom+xml;charset=utf-8
    ETag: W/"datetime'2012-11-13T18%3A23%3A33.137Z'"
    Location: http://127.0.0.1:10002/devstoreaccount1/commenttable(PartitionKey='f6a66b85-afb0-4409-958d-9124259dc09d',RowKey='2520497175878892236')
    Server: Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0
    x-ms-version: 2012-02-12
    Date: Tue, 13 Nov 2012 18:23:33 GMT
    Content-Length: 2249
    
    <?xml version="1.0" encoding="utf-8" standalone="yes"?>
    <entry xml:base="http://127.0.0.1:10002/devstoreaccount1/" xmlns:d="http://schemas.microsoft.com/ado/2007/08/dataservices" xmlns:m="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata" m:etag="W/&quot;datetime'2012-11-13T18%3A23%3A33.137Z'&quot;" xmlns="http://www.w3.org/2005/Atom">
      <id>http://127.0.0.1:10002/devstoreaccount1/commenttable(PartitionKey='f6a66b85-afb0-4409-958d-9124259dc09d',RowKey='2520497175878892236')</id>
      <title type="text"></title>
      <updated>2012-11-13T18:23:33Z</updated>
      <author>
        <name />
      </author>
      <link rel="edit" title="commenttable" href="commenttable(PartitionKey='f6a66b85-afb0-4409-958d-9124259dc09d',RowKey='2520497175878892236')" />
      <category term="devstoreaccount1.commenttable" scheme="http://schemas.microsoft.com/ado/2007/08/dataservices/scheme" />
      <content type="application/xml">
        <m:properties>
          <d:PartitionKey>f6a66b85-afb0-4409-958d-9124259dc09d</d:PartitionKey>
          <d:RowKey>2520497175878892236</d:RowKey>
          <d:Timestamp m:type="Edm.DateTime">2012-11-13T18:23:33.137Z</d:Timestamp>
          <d:AttachmentHasThumbnail m:null="true" />
          <d:AttachmentId m:null="true" />
          <d:AttachmentInfoXml m:null="true" />
          <d:AttachmentType m:type="Edm.Int32">0</d:AttachmentType>
          <d:AuthorId>c086e046-0047-41f5-a982-557a8807e47c</d:AuthorId>
          <d:Comment>shots ring out as the doorlock is destroyed, and the door to the office opens. Enter Bat Guano, brandishing an M-1 carbine.</d:Comment>
          <d:CommentId>c057c667-f04d-4b72-ada1-66dbeab97575</d:CommentId>
          <d:EncryptionVersion m:type="Edm.Int32">0</d:EncryptionVersion>
          <d:IsDeleted m:type="Edm.Boolean">false</d:IsDeleted>
          <d:LikedByUsers>6d64a67f-ed52-451c-8540-00b00a8955d5</d:LikedByUsers>
          <d:Link m:null="true" />
          <d:Location>31.51097,-118.85442</d:Location>
          <d:LocationName>Skipwith, yC</d:LocationName>
          <d:PubDate m:type="Edm.DateTime">2012-11-10T21:33:32.1107763Z</d:PubDate>
          <d:StatusId>f6a66b85-afb0-4409-958d-9124259dc09d</d:StatusId>
          <d:Updated m:type="Edm.DateTime">1753-01-01T00:00:00</d:Updated>
        </m:properties>
      </content>
    </entry>
    
    ------------------------------------------------------------------
    
    GET http://127.0.0.1:10002/devstoreaccount1/CommentTable()?$filter=PartitionKey%20eq%20'f6a66b85-afb0-4409-958d-9124259dc09d'&$top=20 HTTP/1.1
    User-Agent: Microsoft ADO.NET Data Services
    DataServiceVersion: 1.0;NetFx
    MaxDataServiceVersion: 2.0;NetFx
    x-ms-date: Tue, 13 Nov 2012 18:23:34 GMT
    Authorization: SharedKeyLite devstoreaccount1:BjRwtkmMn+Oi0MoO5TM63cfoRPhI2oKm0R9TNi/CaqY=
    x-ms-version: 2012-02-12
    Accept: application/atom+xml,application/xml
    Accept-Charset: UTF-8
    Host: 127.0.0.1:10002
    Connection: Keep-Alive
    
    
    HTTP/1.1 200 OK
    Cache-Control: no-cache
    Content-Type: application/atom+xml;charset=utf-8
    Server: Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0
    x-ms-version: 2012-02-12
    Date: Tue, 13 Nov 2012 18:23:33 GMT
    Content-Length: 2372
    
    <?xml version="1.0" encoding="utf-8" standalone="yes"?>
    <feed xml:base="http://127.0.0.1:10002/devstoreaccount1/" xmlns:d="http://schemas.microsoft.com/ado/2007/08/dataservices" xmlns:m="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata" xmlns="http://www.w3.org/2005/Atom">
      <title type="text">CommentTable</title>
      <id>http://127.0.0.1:10002/devstoreaccount1/CommentTable</id>
      <updated>2012-11-13T18:23:34Z</updated>
      <link rel="self" title="CommentTable" href="CommentTable" />
      <entry m:etag="W/&quot;datetime'2012-11-13T18%3A23%3A33.137Z'&quot;">
        <id>http://127.0.0.1:10002/devstoreaccount1/commenttable(PartitionKey='f6a66b85-afb0-4409-958d-9124259dc09d',RowKey='2520497175878892236')</id>
        <title type="text"></title>
        <updated>2012-11-13T18:23:34Z</updated>
        <author>
          <name />
        </author>
        <link rel="edit" title="commenttable" href="commenttable(PartitionKey='f6a66b85-afb0-4409-958d-9124259dc09d',RowKey='2520497175878892236')" />
        <category term="devstoreaccount1.commenttable" scheme="http://schemas.microsoft.com/ado/2007/08/dataservices/scheme" />
        <content type="application/xml">
          <m:properties>
            <d:PartitionKey>f6a66b85-afb0-4409-958d-9124259dc09d</d:PartitionKey>
            <d:RowKey>2520497175878892236</d:RowKey>
            <d:Timestamp m:type="Edm.DateTime">2012-11-13T18:23:33.137Z</d:Timestamp>
            <d:AttachmentType m:type="Edm.Int32">0</d:AttachmentType>
            <d:AuthorId>c086e046-0047-41f5-a982-557a8807e47c</d:AuthorId>
            <d:Comment>shots ring out as the doorlock is destroyed, and the door to the office opens. Enter Bat Guano, brandishing an M-1 carbine.</d:Comment>
            <d:CommentId>c057c667-f04d-4b72-ada1-66dbeab97575</d:CommentId>
            <d:EncryptionVersion m:type="Edm.Int32">0</d:EncryptionVersion>
            <d:IsDeleted m:type="Edm.Boolean">false</d:IsDeleted>
            <d:LikedByUsers>6d64a67f-ed52-451c-8540-00b00a8955d5</d:LikedByUsers>
            <d:Location>31.51097,-118.85442</d:Location>
            <d:LocationName>Skipwith, yC</d:LocationName>
            <d:PubDate m:type="Edm.DateTime">2012-11-10T21:33:32.1107763Z</d:PubDate>
            <d:StatusId>f6a66b85-afb0-4409-958d-9124259dc09d</d:StatusId>
            <d:Updated m:type="Edm.DateTime">0001-01-01T00:00:00</d:Updated>
          </m:properties>
        </content>
      </entry>
    </feed>
    
    ------------------------------------------------------------------
    

    Tuesday, November 13, 2012 6:29 PM

Answers

All replies