Re: datetime timezone wrong

Raviv_Erel
Level 2

hey,

 i am using the rest api to update lead,

i am sending this string -> 019-11-06T11:18:17+00:00

and the time is update to PST time zone , my account setting is GMT+2,

why its happen?

20 REPLIES 20
Raviv_Erel
Level 2

i will able to test it just next week...lets said i am getting the value..where else do i need to look ?

SanfordWhiteman
Level 10 - Community Moderator

Please show your account settings page.

Raviv_Erel
Level 2
English
English (United States)
(GMT+02:00) Israel Standard Time (Asia/Jerusalem) (IST)
SanfordWhiteman
Level 10 - Community Moderator

Can't repro this. The displayed time is in my local location (I even switched to IST to test), the stored time as expected is in UTC.

How are you testing this? Direct cURL/Postman or passing through some language that may be changing the value?

Raviv_Erel
Level 2

using the rest api direct

can u show me the json you are sending?

SanfordWhiteman
Level 10 - Community Moderator

As simple as (with the Push endpoint):

{
"programName": "Maintenance",
"lookupField": "id",
"input": [
{
"id" : 6142120,
"mktoAcquisitionDate" : "2019-11-07T07:51:43Z"
}
]
}
Raviv_Erel
Level 2

i am using the update lead rest api,

mybe its not working there?

SanfordWhiteman
Level 10 - Community Moderator

Nope, exactly the same results for me.

Raviv_Erel
Level 2

can you put a full example and i will try it?

SanfordWhiteman
Level 10 - Community Moderator

I think you should post a full example of what you're trying.  My Push example above is as simple as can be.

Raviv_Erel
Level 2

talking about the value of the field....got the datetime field on a lead and want to be utc ( i am sending it utc...and it changed to pst)

SanfordWhiteman
Level 10 - Community Moderator

We need to be very precise here. If you read the value using the API then surely you are seeing exactly what you put in, and that's "the value" (since everything else is a displayed value). Pls confirm that first, then we can continue.

Raviv_Erel
Level 2


pastedImage_1.png

this is waht iam taking about 

this is what i sent in the api  2019-11-07T07:51:41Z

and the above its the field value

SanfordWhiteman
Level 10 - Community Moderator

Please answer my previous question, reading via the API. It's an essential question, what you're seeing here is a display value.

Saptarshi_Konar
Level 2

Sanford Whiteman Have timezone related queries for bulk extract API of activity.

You can refer this - https://nation.marketo.com/thread/52253-timezone-for-bulk-export-api-of-activity 

Raviv_Erel
Level 2

OK sent 2019-11-07T07:51:41Z and still marketo attribute datetime was with timezone -10...why is that ( rest api )

SanfordWhiteman
Level 10 - Community Moderator

Where are you checking the field after writing it?

Are you reading it from the API (which should be in Z, exactly as written)?

Or are you talking about the token value in Velocity, which is stringified in CST for all instances but can be easily converted?

SanfordWhiteman
Level 10 - Community Moderator

Are you really sending just "019", not "2019"?

Times are stored in UTC (Z). If you mean to pass UTC in your API call, include "Z", not "+00:00".

Raviv_Erel
Level 2

2019

ok i will try

Saptarshi_Konar
Level 2

I am also confused about the timezone.

Need clarification what is the timezone marketo is considering for rest APIs.