Code Monkey home page Code Monkey logo

timestamp's Introduction

Generic Timestamp Converter

Systems tend to use a mess of timestamp formats, and it can be pretty annoying having to deal with a plethora of smaller tooling to convert them into something resembling a human-readable format. Hence, this poorly cobbled-together script was born. It should work fine under most versions of Python (tested with 2.7/3.x).

Comments, suggestions: arnime < squiggly thing > kpn-cert.nl

What it does

This script is capable of detecting and converting various forms of hexadecimal and integer timestamps into something human readable (ISO 8601 format) and reusable (CSV format). You can run it interactively, directly from the command-line or you can pipe / redirect a series of strings directly to it.

Current version's comments and considerations

Currently, only very basic checking is done to see if the timestamp appears to be correct. For multiline/-item parsing, use the piping/redirect method (see example below).

Usage

Interactive mode

... $ ./timestamp.py
Gimme a timestamp: e0070a0006000f0011002c0031007f00
"Registry","2016-10-15 17:44:49.127"
... $

Command-line mode

... $ ./timestamp.py 919e6539
"FAT","2008-11-05 19:52:34"
... $

Pipe/redirect mode

... $ echo 1346693048 5FBF60C54F2CCF01 1346663048.283 1cf23440c2aac701 f975722c abcd|./timestamp.py
"Integer","2012-09-03 17:24:08"
"NTFS","2014-02-18 02:18:54.252426"
"Integer","2012-09-03 09:04:08.283"
"NTFS","2007-06-09 18:16:08.093750"
"FAT","2002-03-18 14:47:50"
"Error","abcd"
... $

timestamp's People

Contributors

uforia avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

Forkers

jojopittillo4

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.