Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Tempo worklog startTime returning in author's timezone

Niels Frederiksen June 13, 2023

Hi, I am trying to update some fields on a tempo worklog via the API, but I want to avoid updating the startTime attribute.

From what I can gather, when I GET a worklog from the API, the startTime is in the author's timezone, but when update via PUT, then the request expects startTime to be in UTC.

That means that I can't just pass the startTime i get from the API, and I also can't just omit the startTime from the body, because for some reason it is then set to 0:00:00 UTC.

Do I really need to fetch the author's timezone and adjust the startTime accordingly to be able to update a worklog without changing the startTime?

1 answer

1 accepted

1 vote
Answer accepted
Tempo Support
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.
June 13, 2023

Hi Neils,

You may want to explore the option of using Tempo REST API 4.0.

In this version the startTime is not required for updating a worklog. For more information please see the link https://apidocs.tempo.io/#tag/Worklogs/operation/updateWorklog

Best regards,
Chih from Tempo Support

Niels Frederiksen June 14, 2023

Hi Chih, I am using the V4, but if I don't include startTime in the PUT request, then the time gets set to 0:00:00 UTC

Tempo Support
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.
June 14, 2023

Hi Niels,

It is expected that the startTime of the worklog is defaulted to 0:00:00 UTC if you don't specify.

For the reason of this behavior, please see https://tempo-io.atlassian.net/wiki/spaces/KB/pages/232816644/Why+is+there+a+time+difference+between+my+Jira+worklog+and+my+Tempo+worklog

Best regards,
Chih from Tempo Support

Like • Dave Rosenlund _Trundl_ likes this
Niels Frederiksen June 15, 2023

Hi Chih, thank you very much for this. This has helped a lot.

I can now see that my observed behaviour is only happening for worklogs that were created via Jira's API and not Tempo's. Worklogs created directly in Tempo work normally without timezone issues.

So I guess my next question is how can I identify which worklogs are from tempo and which were created in the Jira API. Is it enough to just check if the Author is the Tempo Timesheets add-on user when fetching the worklog from Jira's api?

Like • Dave Rosenlund _Trundl_ likes this
Dave Rosenlund _Trundl_
Community Champion
June 16, 2023 edited

I'm adding an @mention for @Tempo Support, so they see a notice about your last reply, @Niels Frederiksen.

Using the @mention feature will ensure the person(s) you are addressing see your reply 😊

Best,

-dave

Tempo Support
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.
June 16, 2023

HI Niels,

That is correct. It works checking if the worklog author is Tempo Timesheet from Jira to determine if worklogs are created from Tempo.

Best regards,
Chih from Tempo Support

Like • 2 people like this

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
PREMIUM
TAGS
atlassian, team '25 europe, atlassian event, barcelona 2025, jira, confluence, atlassian intelligence, rovo, ai-powered collaboration, developer tools, agile teams, digital transformation, teamwork solutions, atlassian conference, product announcements

🌆 Team '25 Europe registration is now open!

Join the largest European gathering of the Atlassian Community and reimagine what’s possible when great teams and transformative technology come together. Plus, grab your Super Fan ticket now and save over €1,000 on your pass before prices rise on 3 June.

Register now
AUG Leaders

Atlassian Community Events