Skip to Content
Technical Articles
Author's profile photo Ananthu R Biju

Technical User Date & Time format Settings Change in C4C

Hello Developers!!!

I hope you’re doing well.

The blog is about the Date and time format in the response while querying a C4C OData service with a technical user through Postman. Later, we will also discuss how to assign a fixed time zone for a Technical User as well.

Issue:

We created a KUT field in the UI and wrote code to capture the date & time on save based on conditions. Then these fields were extended to the OData services as well.

When we began to test the OData service via Postman I noticed that the newly added Data Time fields in the response body are being populated like below.

{
    "d": {
        "results": [
            {
                "__metadata": {
                    "uri": "Removed due to security reasons",
                    "type": "sapbyd.RPZVVVVVVVVVVVAD3DQueryResult"
                },
                "CVDOC_CREATEDATE_LOCAL": "/Date(1690070400000)/",
                "CVDOC_ID": "1XX55",
                "CVYLD0005Y_D2E80000A9": "5XX4",

                "CVs1A000000000031DB8A": "08/01/2023 11:49:45 INDIA"",
                "CVs100000000000047919": "08/01/2023 09:49:45 INDIA",

                "TDSC_ZSALPHASE_01": "In-Progress",
                "TUSER_ZSTATUS_CODE_01": "Converted"
            }
        ]
    }
}

(I have separated the two new fields in the middle of the above response.)

Here in the response, we are receiving the time zone as INDIA for both fields. When I checked the Technical user time format, it was empty.

In our case, we are using a third-party middleware so they require all the possible time zones to be configured to transform the data, else the data being displayed will be irrelevant in the destination system.

Resolution:

Hence the time zone configuration will be a lengthy process in the middleware we have set a Time Zone for that specific Technical user so whenever you query, in the response you will have the fixed time zone.

You may follow the below steps to navigate to Technical User settings & view the current time zone for the user.

1) Go to Administrator > General Settings & from there open  Support and Technical Users.

Support%20and%20Technical%20Users

Support and Technical Users

2) Click & Open the Technical user, to view the current time zone settings before change.

Choose%20User

Choose User

 

3) Scroll down and navigate to the Regional Settings, where you can see the current Time zone.

Current%20Time%20Zone

Current Time Zone

 

Kindly follow the below steps to assign a constant Time Zone for the Technical User.

1) Login to C4C using Technical User.

Navigate%20to%20Settings

Navigate to Settings

2) Go to My Settings > Regional Settings & Choose the preferred time zone.

Time%20Zone%20Changed

Time Zone Changed

Result:

When we set a fixed time zone for the Interface/Technical User. Thereafter, the response had a constant Time Zone.

The below sample response will give you the result of the change.

{
    "d": {
        "results": [
            {
                "__metadata": {
                    "uri": "Removed due to Privacy reasons",
                    "type": "sapbyd.RPZVVVVVVVVVVVAD3DQueryResult"
                },
                "CVDOC_CREATEDATE_LOCAL": "/Date(1690070400000)/",
                "CVDOC_ID": "1XX55",
                "CVYLD0005Y_D2E80000A9": "5XX4",

                "CVs1A000000000031DB8A": "08/01/2023 11:49:45 UTC+3"",
                "CVs100000000000047919": "08/01/2023 09:49:45 UTC+3",

                "TDSC_ZSALPHASE_01": "In-Progress",
                "TUSER_ZSTATUS_CODE_01": "Converted"
            }
        ]
    }
}

 

Hope you enjoyed the blog. We have a lot more coming, so do like and follow for more such content.

Bye bye!! 🙂

Ananthu R Biju

Senior C4C Consultant

Assigned Tags

      2 Comments
      You must be Logged on to comment or reply to a post.
      Author's profile photo Gregory Liss
      Gregory Liss

      Hello,

      Thanks for the sharing step by step tutorial with point to point. Keep sharing this kind of useful and helpful Mayo Clinic Portal information. I found lot of interesting information from your blog. Your blog is really useful for me.

       

       

       

       

       

      Author's profile photo Ananthu R Biju
      Ananthu R Biju
      Blog Post Author

      Hi Gregory,

      Hope you're doing well.

      I appreciate the time you dedicated to provide me with your valuable feedback.

      I will definitely share more information's in my upcoming blogs.

      Thanks & Regards,

      Ananthu R Biju 😊