-
Notifications
You must be signed in to change notification settings - Fork 217
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
"mlr : time: invalid location name" error #1238
Comments
@briantully sounds like a bug for when tz data is not available. Either Miller should find a way to continue, or, at least fail more gracefully and informatively. (I don't yet know which ...) |
@briantully I am curious -- what does Also, for a workaround: |
Hi @johnkerl ! thanks for the response.
The workaround to set/export $TZ as an empty string seems to do the trick. Thanks for that! So it seems there is some timezone/datetime issues with Go on macOS |
@briantully Ah, thank you! So, TIL It's not just a MacOS issue, as on Linux as well I see
I'm sure this can be accommodated in the Miller Go port, with a bit more effort on my part. Stay tuned! :) |
I just installed miller via choco on Windows, and no matter what I do I get My TZ is in fact set (correctly) to Asia/Taipei. |
Hi @chrisbitmead -- I can't reproduce this on my Windows machine (but note I do have Go installed on that machine To debug a bit, can you please copy/paste the output of:
? |
Also, this may be related ... golang/go#21881 |
|
OK @chrisbitmead this does indeed sound like golang/go#21881 So, here's a weird workaround: install Go (you don't need to use it -- just install it). Version 1.20.5 is fine. (Background is that on Windows, for some very odd reason, the timezone-database files aren't included in built programs. But the Go tools have the timezone database included, so if you install the former -- and don't even use them -- you get the latter for free.) |
@johnkerl a bit of a read through that (long and arduous) thread seems to indicate that one has the option to manually specify the inclusion of the timezone library when building it, which you should probably do on Windows. [ I think golang ought to use Windows timezone APIs on windows, but that's not your problem ] I'm probably not going to install golang, because at least for now, I have no need for timezone features in mlr, and will just set TZ= |
I keep receiving:
I have set TZ="" for my Cygwin but it will mess up with the |
I just installed miller via homebrew on a Mac running Monterey (12.6.3). However when I try to run one of the example commands
mlr --csv cat example.csv
on a CSV file I created, I get the following error:mlr : time: invalid location name
I've tried tracking this down, and it seems to be related to an error within the golang time package when a valid timezone can't be established: https://github.com/golang/go/blob/master/src/time/zoneinfo.go#L642
Any idea how to resolve or work around this?
The text was updated successfully, but these errors were encountered: