Epoch2Date
Epoch2Date is a simple Bash script that converts an epoch timestamp into a human-readable date and time (UTC) without using the date command.
Features
- Supports both positive and negative epoch timestamps.
- Outputs the result in
YYYY-MM-DD HH:MM:SS UTCformat. - Displays the day of the week.
- Works entirely without
date, performing all calculations manually.
Installation
Clone the repository:
git clone https://github.com/BuriXon-code/Epoch2Date
cd Epoch2DateMake the script executable:
chmod +x epochcalcUsage
Run the script with an epoch timestamp as an argument:
./epochcalc 1710445200Example output:
Monday 2024-03-14 12:00:00 UTC
For negative timestamps (dates before 1970):
./epochcalc -1742169546Example output:
Sunday 1914-10-18 01:24:54 UTC
Notes
- If no argument is provided, the script should return an error message.
- Ensure you pass a valid numeric timestamp.
Support
Contact me:
For any issues, suggestions, or questions, reach out via:
- Email: support@burixon.dev
- Contact form: Click here
- Bug reports: Click here
Support me:
If you find this script useful, consider supporting my work by making a donation:
Your contributions help in developing new projects and improving existing tools!