How do I pass a UTC time as the value of lastModified in a REST call

Greg Taylor
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
December 15, 2020

For Confluence Cloud, the cql appears to expect the time in the local time of the person who created the instance.  If the instance is created in Bulgaria ( UTC+2 ), and I want to find any page modified after 9AM UTC, I need to add 2 hours to the query for it to evaluate correctly.  So the query time is 11:00.  If the instance was created by a user in PST (UTC-8), then a query must specify 01:00.  The query doesn't support specifying a timezone.  The query is NOT affected by the timezone in the users profile.  For example, my profile TZ is UTC+0, however I'm in PST.  The Cloud instance has persisted the timezone the instance was created from and it doesn't appear to be visible anywhere.

1 answer

0 votes
Stephen Deutsch
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
December 19, 2020

Hi Greg,

if you use some alternate syntax, you might be able to achieve what you are looking for. It's too bad that the standard CQL syntax doesn't support it:

https://community.atlassian.com/t5/Answers-Developer-Questions/how-to-specify-a-timestamp-including-seconds-in-cql/qaq-p/476287

Greg Taylor
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
January 4, 2021

From the above post:

text ~ "created:[20150610143026 TO 20151231]"

doesn't work ( I used 20200101 TO 20220101 as the dates, when searching for a newly created page). It appears it is treating what is in quotes as a literal string resulting in always returning 0 items. I believe this because replacing what is in quotes with random chars DOES NOT generate a parsing error.

The ~ syntax is documented to be <property> ~ "value".  So, I then used created instead of text, and I got:

Operator '~' is not supported for field 'created'

So, I believe the range syntax support may have been removed in the current (cloud) version.

Any other ideas?

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
FREE
TAGS
AUG Leaders

Atlassian Community Events