Closed deviant closed 2 years ago
It would be nicer yet if this printed the timezone name instead of a numerical offset, but I don't know how to do that easily with chrono
and I'm fairly new to Rust. :)
I took a peek at that but it seems to only hold timezone identifiers. To do this properly, it would require code that looks at the TZ
environment variable, and failing that, /etc/localtime
. I don't know if there's a crate that has this functionality already, but there is an issue for this in chrono-tz
. Feel free to merge as-is, though!
Most users probably want to manipulate time relative to the present in their local timezone. This brings rink's functionality closer to similar tools.
In date(1):
Before:
After: