Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

parse time in local tz #238

Merged
merged 1 commit into from
Sep 10, 2024
Merged

parse time in local tz #238

merged 1 commit into from
Sep 10, 2024

Conversation

ritzk
Copy link
Contributor

@ritzk ritzk commented Sep 9, 2024

resolve #237

Test env ( on alpine)

Set tz to EST

$ date
XXX UTC 2024

$ apk tzdata
$ ln -sf /usr/share/zoneinfo/America/New_York /etc/localtime

$ date
XXX EDT 2024
  • opentofu 1.8.2 (ghcr.io/opentofu/opentofu)
  • terraform 1.9.5 ( docker.io/hashicorp/terraform)

What is tested

  • client and server have same tz
  • server and client have different tz ( client tz is mapped to server tz )

Actual results:
Without this tz is parsed in UTC regardless of local tz

Expected result
tz should parsed in local tz, or provide the option to specify time with tz ( 2024-11-01T13:00-04:00/ 2024-11-01T13:00Z/...)

Copy link

github-actions bot commented Sep 9, 2024

CLA Assistant Lite bot All contributors have signed the CLA ✍️ ✅

@ritzk
Copy link
Contributor Author

ritzk commented Sep 9, 2024

I have read the CLA Document and I hereby sign the CLA

@ritzk ritzk changed the title parse time in local tz draft: parse time in local tz Sep 9, 2024
@ritzk ritzk changed the title draft: parse time in local tz parse time in local tz Sep 9, 2024
Copy link
Member

@alexhung alexhung left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@ritzk
Copy link
Contributor Author

ritzk commented Sep 9, 2024

Look ok. Please add a test for the tz use case in https://github.com/jfrog/terraform-provider-xray/blob/main/pkg/xray/resource/resource_xray_ignore_rule_test.go

@alexhung not familiar enough with go to write a test case for this usecase.

- resolves jfrog#237
- update docs
@alexhung
Copy link
Member

@ritzk Ok no problem. I'll add that once this is merged.

@alexhung alexhung merged commit 34832bb into jfrog:main Sep 10, 2024
2 of 4 checks passed
alexhung added a commit that referenced this pull request Sep 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

dates are parsed in UTC
2 participants