Convenience feature request: Zoned::utcnow() #516
inklesspen
started this conversation in
Experience Reports
Replies: 1 comment
-
I think this is a valid use case, but my hope is that it's somewhat rare. So I'm not sure I want to privilege this particular use case with a convenience constructor. I'm not 100% certain on this though. Another choice is to add |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I've just converted a Discord bot from chrono to jiff, and it went fairly smoothly (in spite of having to use one library that assumes I'm using chrono and a second library that assumes I'm using time).
There's one minor annoyance, though: it's a lot of keystrokes to get a Zoned with the current time in UTC. So I created a helper trait in my bot.
(The use case is that I need to work with Spans that could contain days/weeks/months, and therefore I need to add them to a Zoned. Otherwise I'd happily use a Timestamp. So the best compromise is a Zoned in UTC.)
It would be nice if something like this
utcnow()method could make its way into jiff.Beta Was this translation helpful? Give feedback.
All reactions