Hello,
We have a form to portal-only customer to fill in.
There is a field "dateTime".
Customer adds information.
Automation adds this field value to description, using smart value:
{{issue.customfield_10522.format("yyyy-MM-dd HH:mm")}}
In the description, time is being adjusted to JSM timezone:
> portal-only customer writes 14:00 with their default time zone 0, while
> we get in the description 12:00 due to our timezone +2.
But we don't want it to be adjusted. What setting should we use?
Also, is there any option to change default time zone for portal-only customer? I cannot find.
Thanks the community for help in advance!
Hello @Gabija Dūdienė
Welcome to the Atlassian community.
How do you know that the customer's timezone is 0?
And by 0 do you mean they are in the UTC timezone?
Do you want the date/time they enter to be added to the Description as they enter it, regardless of their timezone or your timezone?
Hello, Trudy,
Thank you for warm welcoming :)
I checked the settings of new users in User management (managed accounts), who have only customers access, and most of them are set to timezone 0 ("Local time
Etc/GMT").
Since the time difference in the form submitted and in the description field after automation is always 2 hours difference, so I assume that portal-only customers are set to timezone 0. And we are +2.
Yes, exactly: the date-time field they enter should be added to the Description as they enter it, regardless of their timezone or our timezone.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Are the users being provisioned into Cloud through an integration with your identity provider, or somebody else's identity provider?
It might be possible for the company provisioning/managing the accounts to set the timezones for accounts through the provisioning process.
Otherwise I think it would be up to each user to set their own timezone preferences.
Dates and times are stored in Jira's database in UTC regardless of the timezone of the user. The timezone of the user affects only that users view of the data in the Jira UI, automating the conversion of it from UTC to the equivalent time in the user's timezone.
With regard to inserting the date/time into the description so that it matches the original entry and is not converted, I think you would have to incorporate in your automation an API call to retrieve information about the user that includes their timezone.
https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-users/#api-rest-api-3-user-get
Then you would have to apply a timezone conversion to your value.
{{issue.customfield_10522.convertToTimeZone("Australia/Sydney").format("yyyy-MM-dd HH:mm z")}}
You would have to figure out which timezone is being specified in the user info and get the appropriate canonical name to add to the convertToTimeZone() function.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello again, Trudy,
Your advice to use the following helped me to solve my problem:
{{issue.customfield_10522.convertToTimeZone("Australia/Sydney").format("yyyy-MM-dd HH:mm z")}}
Thank you soooo much and have a great week further!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.