Skip to content

FELIX-6842: gogo-jline: Implement support for -u (UTC) option in date command - #511

Open
sahvx655-wq wants to merge 1 commit into
apache:masterfrom
sahvx655-wq:gogo-jline-date-utc-support
Open

FELIX-6842: gogo-jline: Implement support for -u (UTC) option in date command#511
sahvx655-wq wants to merge 1 commit into
apache:masterfrom
sahvx655-wq:gogo-jline-date-utc-support

Conversation

@sahvx655-wq

Copy link
Copy Markdown

This PR fixes handling of the documented -u (UTC) timezone option in the JLine shell date command.

In org.apache.felix.gogo.jline.Posix.java, the date command usage documentation includes the -u option (use UTC), but the argument parsing logic did not recognize it and instead fell through to the default error path, resulting in an IllegalArgumentException.

Detect the -u option during argument processing.
Treat -u as a valid option.
Apply the UTC timezone when parsing or formatting dates.

Added testDateUtc in PosixTest.java.
Verified the new test passes successfully.

@sahvx655-wq
sahvx655-wq force-pushed the gogo-jline-date-utc-support branch from 07898f6 to 705b71e Compare June 17, 2026 10:40
@sahvx655-wq sahvx655-wq changed the title gogo-jline: Implement support for -u (UTC) option in date command Jun 17, 2026
@sahvx655-wq

Copy link
Copy Markdown
Author

any update?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

1 participant