Usage Instructions
1. What is a Unix Timestamp?
- A Unix timestamp is the number of seconds or milliseconds elapsed since January 1, 1970, 00:00:00 UTC. This date is known as the "Unix Epoch" and marks the symbolic birth of the Unix operating system. It was chosen as the reference point for Unix's original design and later became a widely adopted time standard in computing.
- 10 digits represent seconds (e.g., 1609459200), while 13 digits represent milliseconds (e.g., 1609459200000).
- Negative timestamps represent dates before 1970.
2. Timestamp to Date/Time
- Enter a timestamp in the "Timestamp → Date Time" section. The system automatically detects whether it's seconds or milliseconds.
- Select a target timezone to view the date/time in that timezone.
- Results show local time, UTC time, selected timezone time, and ISO 8601 format.
3. Date/Time to Timestamp
- Enter a date/time in the "Date Time → Timestamp" section. Multiple formats are supported (e.g., 2024-01-01 12:00:00, ISO 8601).
- Select the timezone of the input date/time, and the system will convert it to the corresponding Unix timestamp.
- Results show both seconds and milliseconds timestamps.
4. Batch Conversion
- In the batch conversion section, enter one timestamp or date/time per line.
- The system automatically detects each line's type and converts it. Results can be exported as CSV.
5. Advanced Options
- Custom Format: Use date-fns format strings (e.g., YYYY-MM-DD HH:mm:ss.SSS) to customize the output format.
- Show Weekday: Display the day of the week in conversion results.
- Show Relative Time: Display relative time descriptions (e.g., 3 hours ago).
FAQ
- Q: Why does entering 10 digits show a date in 1970?
- A: 10 digits are recognized as seconds. If it shows 1970, the timestamp is very small and may be incorrect. Check if it should be milliseconds (13 digits).
- Q: How do I convert dates before 1970?
- A: Enter a negative timestamp. For example, -315619200 represents January 1, 1960, 00:00:00 UTC.
- Q: What does "Local Timezone" mean in the timezone selector?
- A: This is your browser's current local timezone, automatically detected. Select other timezones to view times in different regions.
- Q: What formats are supported for batch conversion?
- A: Timestamps (10 or 13 digits) and common date/time formats (e.g., 2024-01-01 12:00:00, ISO 8601) are supported. The system automatically detects the format.
- Q: How do I use custom formats?
- A: Use date-fns format strings. For example: YYYY-MM-DD for year-month-day, HH:mm:ss for hour:minute:second, SSS for milliseconds. See date-fns documentation for details.