A pair of simple and lightweight C++ command-line utilities for converting Unix timestamps into human-readable date and time formats. Useful for debugging logs, converting database timestamps, or working with epoch-based systems.
Converts a timestamp provided in milliseconds/seconds into a formatted date/time string. Features:
- Directly converts and prints the formatted date/time.
- Accepts Unix timestamp in milliseconds/seconds.
- Outputs result in:
YYYY-mm-dd HH:MM:SS
Compile using a C++11-compatible compiler:
g++ MsToTime.cpp -o MsToTime
g++ SecToTime.cpp -o SecToTime./fileName
> *<timestamp>*Both programs will print the converted timestamp in human-readable form.
UnixTimestampToTime/src/c++/MsToTime.cppโ Milliseconds-to-time converterUnixTimestampToTime/src/c++/SecToTime.cppโ Seconds-to-time converter
MIT