<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: How I can change the REST API timezone to be consistent with my CMIS queries results? in Alfresco Forum</title>
    <link>https://connect.hyland.com/t5/alfresco-forum/how-i-can-change-the-rest-api-timezone-to-be-consistent-with-my/m-p/26199#M11345</link>
    <description>&lt;P&gt;I am running into same issue. Not sure why Alfresco (may be Hyland will) put something short and precise help documentation for such small things. I am book-marking this thread and hoping some expert will provide some expert comment on this.&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Fri, 30 Oct 2020 20:48:07 GMT</pubDate>
    <dc:creator>ajkr195</dc:creator>
    <dc:date>2020-10-30T20:48:07Z</dc:date>
    <item>
      <title>How I can change the REST API timezone to be consistent with my CMIS queries results?</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/how-i-can-change-the-rest-api-timezone-to-be-consistent-with-my/m-p/26196#M11342</link>
      <description>I am using Alfresco Enterprise 5.2 and CMIS 1.1. I do&amp;nbsp;CMIS queries and it returns the right timezone EST but when I use the REST API it always returns UTC. How I can change the REST API timezone to be consistent with my CMIS queries results?</description>
      <pubDate>Thu, 21 Dec 2017 20:45:37 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/how-i-can-change-the-rest-api-timezone-to-be-consistent-with-my/m-p/26196#M11342</guid>
      <dc:creator>ahmedsafwat</dc:creator>
      <dc:date>2017-12-21T20:45:37Z</dc:date>
    </item>
    <item>
      <title>Re: How I can change the REST API timezone to be consistent with my CMIS queries results?</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/how-i-can-change-the-rest-api-timezone-to-be-consistent-with-my/m-p/26197#M11343</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CMIS queries can be executed in many ways. What exactly are you comparing? The same query via the CMIS browser binding&amp;nbsp; CMIS QL using the public search API? I believe the public API defines how dates are returned somewhere.&lt;BR /&gt;&lt;BR /&gt;Can you give the example query?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Andy&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 05 Jan 2018 11:19:13 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/how-i-can-change-the-rest-api-timezone-to-be-consistent-with-my/m-p/26197#M11343</guid>
      <dc:creator>andy1</dc:creator>
      <dc:date>2018-01-05T11:19:13Z</dc:date>
    </item>
    <item>
      <title>Re: How I can change the REST API timezone to be consistent with my CMIS queries results?</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/how-i-can-change-the-rest-api-timezone-to-be-consistent-with-my/m-p/26198#M11344</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;We have the same problem with REST API v1:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG __jive_id="18662" class="image-1 jive-image" src="https://connect.hyland.com/legacyfs/online/alfresco/18662_pastedImage_1.png" style="width: auto; height: auto;" /&gt;&lt;/P&gt;&lt;P&gt;But openDate is 2017-12-27!!!&lt;/P&gt;&lt;P&gt;The same with BirthDate: &lt;IMG __jive_id="18663" class="image-2 jive-image" src="https://connect.hyland.com/legacyfs/online/alfresco/18663_pastedImage_2.png" style="width: auto; height: auto;" /&gt;&lt;/P&gt;&lt;P&gt;Real birthdate is 01.01.1988!!&lt;/P&gt;&lt;P&gt;The datatype is date:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG __jive_id="18664" class="image-3 jive-image" src="https://connect.hyland.com/legacyfs/online/alfresco/18664_pastedImage_3.png" style="width: auto; height: auto;" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This is i&lt;SPAN class="" lang="en"&gt;&lt;SPAN class=""&gt;nadequate &lt;/SPAN&gt;&lt;/SPAN&gt;behaviour of Alfresco Rest API (get nodes, search api) ((&lt;/P&gt;&lt;P&gt;Does anyone known how to fix this case/error?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 17 Jan 2018 09:28:02 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/how-i-can-change-the-rest-api-timezone-to-be-consistent-with-my/m-p/26198#M11344</guid>
      <dc:creator>ivanovpavel1983</dc:creator>
      <dc:date>2018-01-17T09:28:02Z</dc:date>
    </item>
    <item>
      <title>Re: How I can change the REST API timezone to be consistent with my CMIS queries results?</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/how-i-can-change-the-rest-api-timezone-to-be-consistent-with-my/m-p/26199#M11345</link>
      <description>&lt;P&gt;I am running into same issue. Not sure why Alfresco (may be Hyland will) put something short and precise help documentation for such small things. I am book-marking this thread and hoping some expert will provide some expert comment on this.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 30 Oct 2020 20:48:07 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/how-i-can-change-the-rest-api-timezone-to-be-consistent-with-my/m-p/26199#M11345</guid>
      <dc:creator>ajkr195</dc:creator>
      <dc:date>2020-10-30T20:48:07Z</dc:date>
    </item>
    <item>
      <title>Re: How I can change the REST API timezone to be consistent with my CMIS queries results?</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/how-i-can-change-the-rest-api-timezone-to-be-consistent-with-my/m-p/26200#M11346</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;A href="https://migration33.stage.lithium.com/t5/user/viewprofilepage/user-id/82956"&gt;@ajkr195&lt;/A&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Have you submitted a suport request to look into this?&lt;/P&gt;
&lt;P&gt;Cheers,&lt;/P&gt;</description>
      <pubDate>Mon, 02 Nov 2020 11:41:37 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/how-i-can-change-the-rest-api-timezone-to-be-consistent-with-my/m-p/26200#M11346</guid>
      <dc:creator>EddieMay</dc:creator>
      <dc:date>2020-11-02T11:41:37Z</dc:date>
    </item>
    <item>
      <title>Re: How I can change the REST API timezone to be consistent with my CMIS queries results?</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/how-i-can-change-the-rest-api-timezone-to-be-consistent-with-my/m-p/26201#M11347</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;A href="https://migration33.stage.lithium.com/t5/user/viewprofilepage/user-id/62495"&gt;@ivanovpavel1983&lt;/A&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;We have the same problem with REST API v1:&lt;/P&gt;

&lt;P&gt;&lt;IMG style="width: auto; height: auto;" class="image-1 jive-image" src="https://connect.hyland.com/legacyfs/online/alfresco/18662_pastedImage_1.png" border="0" /&gt;&lt;/P&gt;
&lt;P&gt;But openDate is 2017-12-27!!!&lt;/P&gt;
&lt;P&gt;The same with BirthDate: &lt;IMG style="width: auto; height: auto;" class="image-2 jive-image" src="https://connect.hyland.com/legacyfs/online/alfresco/18663_pastedImage_2.png" border="0" /&gt;&lt;/P&gt;
&lt;P&gt;Real birthdate is 01.01.1988!!&lt;/P&gt;
&lt;P&gt;The datatype is date:&lt;/P&gt;

&lt;P&gt;&lt;IMG style="width: auto; height: auto;" class="image-3 jive-image" src="https://connect.hyland.com/legacyfs/online/alfresco/18664_pastedImage_3.png" border="0" /&gt;&lt;/P&gt;

&lt;P&gt;This is i&lt;SPAN class=""&gt;&lt;SPAN class=""&gt;nadequate &lt;/SPAN&gt;&lt;/SPAN&gt;behaviour of Alfresco Rest API (get nodes, search api) ((&lt;/P&gt;
&lt;P&gt;Does anyone known how to fix this case/error?&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;ACS runs in UTC time zone by default. Even for d:date type the values are stored as timestamps but time values after date remains all 0s. We change/sync acs/share/solr/db etc. server time zones based on specific requirements if there is a need to keep the server in a specific time zone.&lt;/P&gt;
&lt;P&gt;otp:agreementOpenDate seems to be using d:dateTime as data type as i can see a time fragment in the value. And otp:birthDate is mapped to d:date as per your screenshot. It is strage to see this value after date: "T21&lt;FONT color="#333300"&gt;:00:00.000+0000&lt;/FONT&gt;", for date type values are saved as &lt;FONT color="#333300"&gt;"T00:00:00.000+0000", not sure why there is a time in the values you have mentioned.&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;However, I tried to replicate the issue and i could not see the issue you have mentioned.&lt;/P&gt;
&lt;P&gt;I tried date as '01.01.1988' and '2017-12-27'.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Used this docker compose to test this issue:&amp;nbsp;&lt;A href="https://github.com/Alfresco/acs-community-deployment/blob/master/docker-compose/docker-compose.yml#L1" target="_self" rel="nofollow noopener noreferrer"&gt;https://github.com/Alfresco/acs-community-deployment/blob/master/docker-compose/docker-compose.yml#L1&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;I created below aspect via Model manager and applied it on some nodes for testing:&lt;/P&gt;
&lt;PRE&gt;&amp;lt;aspect name="dt:dateTestAspect"&amp;gt;
            &amp;lt;title&amp;gt;dtAspect&amp;lt;/title&amp;gt;
            &amp;lt;properties&amp;gt;
&lt;STRONG&gt;                &amp;lt;property name="dt:birthDate"&amp;gt;
&lt;/STRONG&gt;                    &amp;lt;title&amp;gt;BirthDate&amp;lt;/title&amp;gt;
&lt;FONT color="#FF0000"&gt;&lt;STRONG&gt;                    &amp;lt;type&amp;gt;d:date&amp;lt;/type&amp;gt;
&lt;/STRONG&gt;&lt;/FONT&gt;                    &amp;lt;mandatory&amp;gt;false&amp;lt;/mandatory&amp;gt;
                    &amp;lt;index enabled="true"&amp;gt;
                        &amp;lt;tokenised&amp;gt;true&amp;lt;/tokenised&amp;gt;
                    &amp;lt;/index&amp;gt;
                &amp;lt;/property&amp;gt;
            &amp;lt;/properties&amp;gt;
        &amp;lt;/aspect&amp;gt;&lt;/PRE&gt;
&lt;P&gt;When i get metadata for node:&amp;nbsp;workspace://SpacesStore/7c1df281-c7f9-45bc-b0a7-21ab6fd2ac0b&lt;/P&gt;
&lt;PRE&gt;http://localhost:8080/alfresco/api/-default-/public/alfresco/versions/1/nodes/7c1df281-c7f9-45bc-b0a7-21ab6fd2ac0b&lt;/PRE&gt;
&lt;P&gt;I get this response, notice the birthdate property, it looks correct:&lt;/P&gt;
&lt;PRE&gt;{
    "entry": {
        "isFile": true,
        "createdByUser": {
            "id": "admin",
            "displayName": "Administrator"
        },
        "modifiedAt": "2020-11-02T23:08:58.158+0000",
        "nodeType": "cm:content",
        "content": {
            "mimeType": "application/pdf",
            "mimeTypeName": "Adobe PDF Document",
            "sizeInBytes": 305288,
            "encoding": "UTF-8"
        },
        "parentId": "84d277d7-47f4-4d20-87d2-e98921e55f79",
        "aspectNames": [
            "rn:renditioned",
&lt;FONT color="#FF0000"&gt;&lt;STRONG&gt;            "dt:dateTestAspect",
&lt;/STRONG&gt;&lt;/FONT&gt;            "cm:versionable",
            "cm:titled",
            "cm:auditable",
            "cm:author",
            "cm:thumbnailModification"
        ],
        "createdAt": "2020-11-02T23:08:58.158+0000",
        "isFolder": false,
        "modifiedByUser": {
            "id": "admin",
            "displayName": "Administrator"
        },
        "name": "Printer-MG3600-NetworkConfig.pdf",
        "id": "&lt;SPAN&gt;7c1df281-c7f9-45bc-b0a7-21ab6fd2ac0b&lt;/SPAN&gt;",
        "properties": {
&lt;FONT color="#FF0000"&gt;&lt;STRONG&gt;            "dt:birthDate": "1988-01-01T00:00:00.000+0000",
&lt;/STRONG&gt;&lt;/FONT&gt;            "cm:versionType": "MAJOR",
            "cm:versionLabel": "1.0",
            "cm:lastThumbnailModification": [
                "doclib:1604358538907"
            ]
        }
    }
}&lt;/PRE&gt;
&lt;PRE&gt;&lt;SPAN&gt;http://localhost:8080/alfresco/api/-default-/public/alfresco/versions/1/nodes/5a2ea7d8-57a7-453b-9be7-83dc73639dea&lt;BR /&gt;&lt;/SPAN&gt;&lt;BR /&gt;{
    "entry": {
        "isFile": true,
        "createdByUser": {
            "id": "admin",
            "displayName": "Administrator"
        },
        "modifiedAt": "2020-11-02T23:20:07.152+0000",
        "nodeType": "cm:content",
        "content": {
            "mimeType": "application/zip",
            "mimeTypeName": "ZIP",
            "sizeInBytes": 1046,
            "encoding": "UTF-8"
        },
        "parentId": "84d277d7-47f4-4d20-87d2-e98921e55f79",
        "aspectNames": [
            "rn:renditioned",
&lt;FONT color="#FF0000"&gt;&lt;STRONG&gt;            "dt:dateTestAspect",
&lt;/STRONG&gt;&lt;/FONT&gt;            "cm:versionable",
            "cm:titled",
            "cm:auditable",
            "cm:author",
            "cm:thumbnailModification"
        ],
        "createdAt": "2020-11-02T23:20:07.152+0000",
        "isFolder": false,
        "modifiedByUser": {
            "id": "admin",
            "displayName": "Administrator"
        },
        "name": "DateTest.zip",
        "id": "5a2ea7d8-57a7-453b-9be7-83dc73639dea",
        "properties": {
&lt;STRONG&gt;&lt;FONT color="#FF0000"&gt;            "dt:birthDate": "2017-12-27T00:00:00.000+0000",
&lt;/FONT&gt;&lt;/STRONG&gt;            "cm:versionType": "MAJOR",
            "cm:versionLabel": "1.0",
            "cm:lastThumbnailModification": [
                "doclib:1604359207505",
                "pdf:1604359209714"
            ]
        }
    }
}&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/PRE&gt;

&lt;P&gt;Repository api also resulted same results, example:&lt;/P&gt;
&lt;P&gt;&lt;A href="http://127.0.0.1:8080/alfresco/service/api/metadata?nodeRef=workspace://SpacesStore/5a2ea7d8-57a7-453b-9be7-83dc73639dea" target="_blank" rel="noopener nofollow noreferrer"&gt;http://127.0.0.1:8080/alfresco/service/api/metadata?nodeRef=workspace://SpacesStore/5a2ea7d8-57a7-453b-9be7-83dc73639dea&lt;/A&gt;&lt;/P&gt;
&lt;PRE&gt;{
nodeRef: "workspace://SpacesStore/5a2ea7d8-57a7-453b-9be7-83dc73639dea",
aspects: [
"{http://www.alfresco.org/model/rendition/1.0}renditioned",
&lt;FONT color="#FF0000"&gt;&lt;STRONG&gt;"{dateTest}dateTestAspect",
&lt;/STRONG&gt;&lt;/FONT&gt;"{http://www.alfresco.org/model/content/1.0}versionable",
"{http://www.alfresco.org/model/content/1.0}titled",
"{http://www.alfresco.org/model/content/1.0}auditable",
"{http://www.alfresco.org/model/system/1.0}referenceable",
"{http://www.alfresco.org/model/system/1.0}localized",
"{http://www.alfresco.org/model/content/1.0}author",
"{http://www.alfresco.org/model/content/1.0}thumbnailModification"
],
mimetype: "application/zip",
type: "{http://www.alfresco.org/model/content/1.0}content",
properties: {
{http://www.alfresco.org/model/content/1.0}created: "2020-11-02T23:20:07.152Z",
{http://www.alfresco.org/model/content/1.0}lastThumbnailModification: [
"doclib:1604359207505",
"pdf:1604359209714"
],
&lt;FONT color="#FF0000"&gt;&lt;STRONG&gt;{dateTest}birthDate: "2017-12-27T00:00:00.000Z",
&lt;/STRONG&gt;&lt;/FONT&gt;{http://www.alfresco.org/model/content/1.0}creator: "admin",
{http://www.alfresco.org/model/system/1.0}node-uuid: "8d9f5c8a-5795-4821-aa65-8c0e76499414",
{http://www.alfresco.org/model/content/1.0}name: "DateTest.zip",
{http://www.alfresco.org/model/content/1.0}content: "contentUrl=store://2020/11/2/23/20/f139b7e6-49c8-40f8-bef5-957597c9c7e2.bin|mimetype=application/zip|size=1046|encoding=UTF-8|locale=en_US_|id=290",
{http://www.alfresco.org/model/system/1.0}store-identifier: "SpacesStore",
{http://www.alfresco.org/model/content/1.0}versionLabel: "1.0",
{http://www.alfresco.org/model/content/1.0}autoVersion: true,
{http://www.alfresco.org/model/content/1.0}initialVersion: true,
{http://www.alfresco.org/model/content/1.0}versionType: "MAJOR",
{http://www.alfresco.org/model/content/1.0}autoVersionOnUpdateProps: false,
{http://www.alfresco.org/model/system/1.0}store-protocol: "workspace",
{http://www.alfresco.org/model/system/1.0}node-dbid: 936,
{http://www.alfresco.org/model/system/1.0}locale: "en_US",
{http://www.alfresco.org/model/content/1.0}modifier: "admin",
{http://www.alfresco.org/model/content/1.0}modified: "2020-11-02T23:20:07.152Z"
}
}&lt;/PRE&gt;
&lt;P&gt;Results was exactly same for ACS 5.2.7 enterprise and ACS 6.2.1-A8 community in my case via V1 and repo api. I have not tried CMIS though&lt;/P&gt;</description>
      <pubDate>Mon, 02 Nov 2020 23:38:59 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/how-i-can-change-the-rest-api-timezone-to-be-consistent-with-my/m-p/26201#M11347</guid>
      <dc:creator>abhinavmishra14</dc:creator>
      <dc:date>2020-11-02T23:38:59Z</dc:date>
    </item>
  </channel>
</rss>

