Skip to content

fix: ensure timestamp and isoTimestamp return current time instead of random values #4679

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

Merged

Conversation

anusree-bruno
Copy link
Collaborator

@anusree-bruno anusree-bruno commented May 15, 2025

Description

This PR addresses the issue where the timestamp and isoTimestamp functions were returning random values instead of the current time. The changes ensure that both functions now return the actual current time.

Closes #4631
Jira: https://usebruno.atlassian.net/browse/BRU-1131

Changes Made:

  • Updated the timestamp function to return the current Unix timestamp in seconds.
  • Updated the isoTimestamp function to return the current time in ISO format.
  • Added tests to verify that both functions return current time values within a 2-second window.

Before:
Screenshot 2025-05-15 at 14 28 52

After:

Screenshot 2025-05-15 at 14 28 39

Contribution Checklist:

  • The pull request only addresses one issue or adds one feature.
  • The pull request does not introduce any breaking changes
  • I have added screenshots or gifs to help explain the change if applicable.
  • I have read the contribution guidelines.
  • Create an issue and link to the pull request.

Note: Keeping the PR small and focused helps make it easier to review and merge. If you have multiple changes you want to make, please consider submitting them as separate pull requests.

Publishing to New Package Managers

Please see here for more information.

@pull-request-size pull-request-size bot added size/S and removed size/M labels May 26, 2025
@lohit-bruno lohit-bruno merged commit 73b0f09 into usebruno:main May 26, 2025
3 of 6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

isoTimestamp returns some random timestamp
4 participants