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

Native support for Serializing/Deserializing prost_types::Timestamp & std::time::SystemTime #187

Open
markuskobler opened this issue Jul 23, 2024 · 2 comments
Labels
enhancement New feature or request

Comments

@markuskobler
Copy link

I realize chrono is currently neatly integrated with firestore-rs but would there be a downside to also supporting google.protobuf.Timestamp and std::time::SystemTime when it comes to serializing and deserializing timestamps?

Would be happy to pull a PR together if you were open to this and had a preferences on how it would be implemented.

Also as an aside we have tried to stick with time instead of chrono so ideally chrono would be a default feature we could disable.

@abdolence
Copy link
Owner

abdolence commented Jul 28, 2024

Hey, yes, this is my long term concern as well. The time I started working with Firestore (it wasn't even published here yet), chrono was almost single choice that we had.

Nowadays, there is a plenty good choices:

  • time
  • jiff

Now the problem is that somehow give a choice for date/time integration (not so disruptive for the current users).
Probably it needs to introduce some internal type based on something like std::time or Timestamp and optional (feature gated) conversion for different crates out there.

Of course I'm open to any contributions here, since I'm focusing a bit on different stuff for now and it would be great if someone can implement this.

@abdolence abdolence added the enhancement New feature or request label Jul 28, 2024
@abdolence
Copy link
Owner

And I don't think there is no need to make chrono somehow special one (or even default one).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants