Skip to content

fix: change createWorkspace to use dbtime.Time #19414

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
merged 2 commits into from
Aug 20, 2025

Conversation

ssncferreira
Copy link
Contributor

@ssncferreira ssncferreira commented Aug 19, 2025

The createWorkspace function was updated to use an injected Clock, which makes it possible to mock time in tests: https://github.com/coder/coder/pull/19264/files#diff-46f90baab52ea3ad914acbde30d656dbc8e46f5918d19bc056c445a1dc502482R1130
For database operations, however, it is recommended to use dbtime.Time since it rounds to the microsecond, the smallest unit of precision supported by Postgres.

@ssncferreira ssncferreira changed the title fix: now in createWorkspace to use dbtime.Time fix: change createWorkspace to use dbtime.Time Aug 19, 2025
@ssncferreira ssncferreira marked this pull request as ready for review August 20, 2025 13:42
@ssncferreira ssncferreira merged commit 5b08f8b into main Aug 20, 2025
31 checks passed
@ssncferreira ssncferreira deleted the ssncferreira/fix-now-create-workspace branch August 20, 2025 13:58
@github-actions github-actions bot locked and limited conversation to collaborators Aug 20, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy