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

allow any leading timezone #27

Closed
jtmoon79 opened this issue Sep 21, 2022 · 1 comment
Closed

allow any leading timezone #27

jtmoon79 opened this issue Sep 21, 2022 · 1 comment
Labels
datetime format support for parsing some datetime pattern format enhancement New feature or request good first issue Good for newcomers

Comments

@jtmoon79
Copy link
Owner

Currently

CLI options -u and -l will preprint the UTC or Local timezone. However, a user may want to review syslogs according to a different timezone.

Feature Request

Allow CLI option for any timezone to be preprinted. e.g.

   -pz, --prepend-timezone    Prepend DateTime in the passed Timezone for every line.
                              Accepts all strftime timezone formats.

extra TODOs

Update other CLI options.

   -u , --prepend-utc   Prepend DateTime in the UTC Timezone for every line. This is the same as passing "-pt UTC".
   -l , --prepend-local Prepend DateTime in the UTC Timezone for every line. This is the same as passing "-pt Local".

Add -pz to the same CLI option grouping.

Add example to README.md

            Print only the syslog lines that occurred two days ago during the noon hour in
            Bengaluru, India (timezone offset +05:30) but shown in timezone Bengaluru, India.

            ```lang-text
            s4 /var/log -pz "+05:30" -a "$(date -d "2 days ago 12:00" '+%Y-%m-%dT%H:%M:%S') +05:30" -b "$(date -d "2 days ago 13:00" '+%Y-%m-%dT%H:%M:%S') +05:30"
            ```
@jtmoon79 jtmoon79 added the enhancement New feature or request label Sep 21, 2022
@jtmoon79 jtmoon79 added the good first issue Good for newcomers label Oct 7, 2022
@jtmoon79 jtmoon79 added the datetime format support for parsing some datetime pattern format label Feb 9, 2023
@jtmoon79
Copy link
Owner Author

Added in 630b8ce

jtmoon79 added a commit that referenced this issue May 21, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
datetime format support for parsing some datetime pattern format enhancement New feature or request good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

1 participant