-
-
Notifications
You must be signed in to change notification settings - Fork 73
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
Extend FormatDateFunc to support seconds since Unix Epoch #130
Comments
Hi @benjamb! Thanks for this suggestion. I intended the While I can certainly see that having access to a "unix timestamp" might be useful in some situations, to me that feels like a separate function from Given that, I'd suggest creating a new function to convert a per-conventions timestamp (RFC 3339) into a Unix timestamp, rather than adding it to I'm currently being quite reserved about adding new functions directly in the Thanks again! |
@apparentlymart Thanks for the thorough response! I agree it doesn't actually make much sense to extend With regards to the HashiCorp |
Hi @benjamb, The library I linked to was created by the Packer team specifically to hold the functions that Packer uses that I declined for upstreaming in this library (due to them having some design oddities inherited from Terraform), so I expect inactivity there is more a consequence of the library currently being "done" as far as Packer is concerned, rather than because it's closed to future enhancements. Although I do work at HashiCorp along with being the maintainer of this personal project, I don't work on Packer and so I can't speak to what the Packer team would want to include or how they would want to include it, but I would think a discussion in their main repository would probably the best place to start, and then you can hear directly from them about whether they'd be interested in such a new function and, if so, whether they'd rather have it live in the Packer codebase or in the shared functions library I linked to before. |
@apparentlymart Ah, that makes sense. Yeah I've opened an issue in the packer repository for now, we'll see what happens. |
It would be handy to be able to convert a provided date to a Unix timestamp. I'm using packer which wraps this function via its
timestamp()
function.The text was updated successfully, but these errors were encountered: