exa icon indicating copy to clipboard operation
exa copied to clipboard

Replace datetime and zoneinfo_compiled crates with chrono

Open ariasuni opened this issue 3 years ago • 7 comments

After hours of pain trying to retro-engineer several libc including glibc, musl and Bionic (Android), I’ve come to the conclusion that it’s the wrong approach. But I couldn’t understand the mess that’s time and timezone handling in C, much less investigate every OS we would like exa to support.

Fortunately, chrono already provides us a nice Rust layer on top of all the nasty C platform-dependent code. Apart from Android, chrono also supports Windows.

  • Improve compatibility with other OSes, timezone are handled for us
  • Reduce significantly code handling and rendering time

Fix #620 Fix #712 Fix #856 Fix #1047

Close #846 Close #857

ariasuni avatar May 09 '21 17:05 ariasuni

I just started using NixOS and I'm seeing Unable to determine time zone: No such file or directory (os error 2) from exa v0.10.1. Does this PR cover fixing that?

dbeckwith avatar Oct 25 '21 13:10 dbeckwith

I guess it might be #856 which is fixed by this?

dbeckwith avatar Oct 25 '21 13:10 dbeckwith

Actually I was able to fix the error just by setting the time.timeZone NixOS config option.

dbeckwith avatar Oct 25 '21 13:10 dbeckwith

@dbeckwith I seem to have the same issue, though I have time.timeZone set properly

fkarg avatar Mar 26 '22 10:03 fkarg

Please open an issue or comment under an existing issue so I can keep track of that properly.

ariasuni avatar Mar 26 '22 13:03 ariasuni

I found this PR after you linked it from my issue #1047 :)

fkarg avatar Mar 26 '22 15:03 fkarg

Is this blocked on anything? I would love to see it merged - exa continues to have trouble with the time zone on several of my machines due to how the TZ environment variable is handled. PRs to correct TZ handling per the glibc manual were closed in lieu of this PR. (see https://github.com/ogham/exa/pull/911)

mrkline avatar Jun 17 '22 22:06 mrkline

This PR makes it work properly on my Arch machine. Can it be merged soon?

txtsd avatar Feb 08 '23 20:02 txtsd

Same for me on Debian testing, I never had this issue before, but I often use export TZ=:/etc/localtime in bash scripts. And today after some updates I-m now getting Unable to determine time zone: No such file or directory (os error 2) when I use exa -l. Please release this PR.

tkapias avatar Mar 06 '23 14:03 tkapias

@ogham can you please merge/release this one?

StayPirate avatar Jul 06 '23 05:07 StayPirate

@ariasuni @ogham Please bump the priority up on this one.

txtsd avatar Aug 24 '23 18:08 txtsd

Closing this, since exa is unmaintained (see https://github.com/ogham/exa/issues/1243), and this has (finally :tada:) been merged in the active fork eza!

ariasuni avatar Sep 11 '23 22:09 ariasuni