Skip to content

A simple Rust utility to convert log files to UTC 🦀

License

Notifications You must be signed in to change notification settings

msLinuxNinja/chronox

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

32 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

chronox

======= A simple Rust utility to convert log files from local time to UTC 🦀.

GitHub Super-Linter

It takes dates in Month Day HH:MM:SS format and converts it to YYYY-MM-DD HH:MM:SS Z format.

For example using a -06:00 offset:

Aug 27 00:00:00 host systemd[1]: Reloaded httpd.service - The Apache HTTP Server.

Gets converted to:

2023-08-27 06:00:00 UTC host systemd[1]: Reloaded httpd.service - The Apache HTTP Server.

Usage

chronox can be used from the command line with the following syntax:

chronox [logfile] [timezone offset]

The timezone offset needs to be in -+00:00 format.

A file with the suffix -chronox will be saved in the same directory as the original file.

Downloading

Grab one of the binaries from the releases page for the corresponding Operating System.

Or download directly by running:

wget https://github.com/msLinuxNinja/chronox/releases/download/0.1.0/chronox
chmod +x chronox

Gotchas

  • The utility assumes the year is current year.
  • Only files that use Month Day HH:MM:SS format would work (Like messages or syslog).

About

A simple Rust utility to convert log files to UTC 🦀

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages