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

Add built-in function to convert RFC3339 to Unix timestamps #576

Conversation

SayakMukhopadhyay
Copy link

Some providers outputs unix timestamps and some other RFC 3339 where some providers input unix and others RFC 3339 and I need to convert between the 2 formats when passing outputs to inputs. I am using YAML only as I want to keep using declarative syntax. Hence, based on the discussion I had in the community slack (ref: https://pulumi-community.slack.com/archives/C037PV12W6L/p1715335945150989) with @t0yv0 .

I don't have much experience with the inner workings of this repo and am mostly using toBase64 as an example to write this.

Copy link

PR is now waiting for a maintainer to take action.

Note for the maintainer: Commands available:

  • /run-acceptance-tests - used to test run the acceptance tests for the project

@Frassle
Copy link
Member

Frassle commented May 10, 2024

Rather than adding this as a builtin to yaml it looks like it would fit as a function in pulumi-std (https://github.com/pulumi/pulumi-std). We're trying to prefer helper functions in there rather than specifically in yaml as it allows other languages to benefit from them as well.

@t0yv0
Copy link
Member

t0yv0 commented May 10, 2024

Thanks @Frassle - I apologize for directing to the wrong repo, I wasn't quite up to date on this.

@SayakMukhopadhyay
Copy link
Author

@Frassle Thanks for directing me to the correct place. I will close this PR and create a new PR from the std package. Just one question, the std package isn't in the registry right? Although there is some docs in the repo itself, I don't see any docs in the pulumi website or it might be an oversight on my part.

@t0yv0
Copy link
Member

t0yv0 commented May 10, 2024

Good call, we'll have a look! pulumi/pulumi-std#55 thanks!

@SayakMukhopadhyay
Copy link
Author

In the meantime, I will work on adding the functions to std anyway since I can install the provider just fine. Thank you for the quick responses. I will probably be able to create a draft PR before bed.

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.

None yet

3 participants