chrono icon indicating copy to clipboard operation
chrono copied to clipboard

How to get "now" with DateTime<Timezone>?

Open tobymurray opened this issue 2 years ago • 0 comments

Analogous to Utc::now, I'd like to get now as a DateTime<Timezone> for a given timezone, would this be the idiomatic way to do so?

Utc::now().with_timezone(timezone)

Similar to #169, I struggled a lot more than I think I ought to have to try and do some relatively straightforward seeming tasks.

I'd love to:

  • hear if there's a better way to do it
  • add to the documentation (open to suggestions where would make a good fit, maybe right on DateTime#now?)
  • commiserate with how hard it is to make an intuitive time library when it's so damn complicated! Thanks for all the work.

tobymurray avatar Nov 17 '21 04:11 tobymurray