Possible bug with DateTime with 3.6.0?

Hi,

The query below worked in v3.5.3 but no longer works in v3.6.0. The query was called using POST passing JSON-encoded body in the following format:

            const jsonObj = {      
                'id': '934',
                'postType': 'Electronics',
                'title': 'Mac Mini',
                'description': '3 years old', 
                'timestamp': '1657048142' //  Unix Epoch Time
            }
CREATE QUERY addPost(STRING id, STRING postType, STRING title, STRING description, DATETIME timestamp) FOR GRAPH Social SYNTAX V2 {

  // All Post vertex attributes are STRING except timestamp is type DATETIME
  INSERT INTO Post (PRIMARY_ID, postType, title, description, timestamp) VALUES (id, postType, borrow, title, description, timestamp);
  
  PRINT 'success'; 
}

In v3.6.0 I get the following error. Tried passing an integer instead of string and still got the same error.

“error_: unexpected error runtime error: cannot update (2) the attribute ‘timestamp’ in vertex ‘post’ (expected: int, given: udt)\n”

Is this a bug or am I doing something wrong?

Alvin

No idea what changed between releases, but I am curious as to why you wouldnt just pass a string. I do this all the time

CREATE DISTRIBUTED QUERY addPost(STRING startDt = "2021-10-01") FOR GRAPH Social  SYNTAX V2{
   
  DATETIME startDate;
  startDate = to_datetime(startDt);

Thx for replying Mark. I just wanted to skip a step if possible. May have to resort to this.

@alvinchan There were two different releases in the past few weeks on TigerGraph Cloud. One was June 20th and the other was July 5th. When did you provision your latest solution? This will help me testing to see if I can replicate the issue.

Hi Jon, it’s the July 5th release.