Skip to content
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

Date command used in matches option not working on all systems #4

Open
fritzrehde opened this issue May 2, 2022 · 6 comments
Open
Assignees
Labels
bug Something isn't working

Comments

@fritzrehde
Copy link
Owner

The date command that is used to convert the date of the matches to the time zone of the user is not working on all systems (e.g. does not work on MacOS).

@fritzrehde fritzrehde added the bug Something isn't working label May 2, 2022
@fritzrehde fritzrehde self-assigned this May 2, 2022
@fritzrehde
Copy link
Owner Author

fritzrehde commented May 5, 2022

Unfortunately, this problem is not an easy-to-fix programming mistake. It occurs because different systems (e.g. GNU Linux and MacOS) have different implementations of the date command. The current implementation is developed with the GNU Linux date command in mind.

@fritzrehde
Copy link
Owner Author

fritzrehde commented May 17, 2022

For now, footy will through an error if it is used on a system that doens't have a date command that works like the GNU Linux version. I will try to add some alternative date command options for other platforms such as MacOS.

@fritzrehde
Copy link
Owner Author

The -m matches option doesn't work completely on macOS yet, but -m together with the -r raw option should work now.

@dstar59
Copy link

dstar59 commented May 24, 2022

great job!
but date not only problem on mac
xxx:$ footy -l PL -m -10
Error: Invalid days format
Usage: footy [-l | -t | -s | -m <DAYS+/-> | -I | -i | -r | -k | -h]
Try 'footy -h' for more information
xxx:$

my system:
xxxxxx

OS: Slackware 15.0 x86_64 x86_64
Host: ASUSTeK COMPUTER INC. P8H67-M
Kernel: 5.15.38
Uptime: 2 days, 2 hours, 16 mins
Packages: 1622 (pkgtool)
Shell: bash 5.1.16
Resolution: 1920x1200
Terminal: /dev/pts/0
CPU: Intel i5-2400S (4) @ 3.300GHz
GPU: Intel 2nd Generation Core Processor Family
Memory: 900MiB / 11674MiB

@fritzrehde
Copy link
Owner Author

Even some Linux distros have different date command implementations, currently footy only works with the GNU coreutils date command.

@fritzrehde
Copy link
Owner Author

Your problem, however, is because the matches option has changed. You now have to use -m 10- instead of -m -10. See issue #3 and footy -h for more information.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants