Конвертер Unix-времени

Преобразует дату и время в Unix-секунды, миллисекунды и строки ISO.

// about

Об этом инструменте

Компьютеры считают время в секундах с 1 января 1970 года (Unix-время). Этот инструмент превращает эти числа в понятные даты и время.

Как использовать

  1. Вставьте число или выберите дату в календаре.
  2. Нажмите 'Конвертировать'.
  3. Получите результат в формате локального времени и UTC.

Зачем используют этот инструмент

  • Переводит числа вида 1700000000 в реальные даты за секунду.
  • Поддерживает формат секунд и миллисекунд.
  • Удобно для проверки логов серверов и отчетов об ошибках.

Часто задаваемые вопросы (FAQ)

Что такое Unix-время?

Это количество секунд, прошедших с полуночи UTC 1 января 1970 года.

Почему число может быть 10-значным или 13-значным?

10 цифр — это секунды, а 13 цифр — миллисекунды.

Какое часовой пояс используется?

Отображается ваше местное время и международное время UTC.

Руководства · Дата и время · 8 мин чтения

Метки времени Unix: секунды или миллисекунды, часовые пояса и проблема 2038 года

Когда наступает 1700000000? Почему некоторые системы используют 13-значные числа? Почему время сдвинулось ровно на три часа? Большинство ошибок со временем исчезает, если разобраться в нескольких понятиях.

Метка времени Unix (Unix-время, epoch time) — это одно целое число, равное количеству секунд, прошедших с 00:00:00 UTC 1 января 1970 года, то есть с эпохи Unix. 0 — это 1970-01-01 00:00:00 UTC, а 1700000000 — 2023-11-14 22:13:20 UTC.

0           → 1970-01-01 00:00:00 UTC
1700000000  → 2023-11-14 22:13:20 UTC
1735689600  → 2025-01-01 00:00:00 UTC
2147483647  → 2038-01-19 03:14:07 UTC
Метки времени Unix: 10 или 13 цифр, перевод между UTC и местным временем, ловушки летнего времени и проблема 2038 года.
Читать →
Сделать с ИИ

Создайте этот инструмент сами с помощью ИИ

Нужна своя версия? Скопируйте промпт в чат с ИИ или сохраните файл навыка для ИИ-агента. В них описаны функции, особые случаи и тесты, которые мы использовали.

Промпт и навык даны на английском — ИИ-инструменты хорошо его понимают.

Промпт-задание для ИИ

Вставьте как есть в Claude, ChatGPT или Gemini.

You are an experienced full-stack web developer. Build a web tool called "Конвертер Unix-времени" that meets the requirements below.

## Goal

Build a tool that converts between Unix timestamps and human-readable dates.

## Core features

- Timestamp → date and date → timestamp
- Auto-detect seconds (10 digits) or milliseconds (13 digits)
- Show UTC, local and a chosen IANA zone together
- ISO 8601 output
- 'Now' button

## Inputs

- A timestamp or a date and time
- Time zone

## Outputs

- Converted date or timestamp
- ISO 8601 string
- Relative time (e.g. 3 days ago)

## Edge cases and handling rules

- Support negative timestamps before 1970
- Handle values after 2038 correctly
- Explain skipped or repeated local times at DST transitions
- Validate non-numeric input

## Implementation requirements

- Build it as a single page (HTML, CSS, JavaScript) that runs entirely in the browser, and never send the user's input to a server.
- Make the UI responsive and easy to use on mobile; label every input and keep everything keyboard accessible.
- Add a Copy button for results and show clear, friendly error messages for invalid input.
- Keep the core logic in functions separate from the UI so it can be unit-tested.

## Definition of done (test cases)

- 0 → 1970-01-01T00:00:00Z
- 1700000000 → 2023-11-14T22:13:20Z
- 1700000000000 (13 digits) is the same instant

First outline your implementation plan in at most five lines, then write the complete code, and finally explain how to check the test cases above.

Навык (SKILL.md)

Сохраните как .claude/skills/build-timestamp-converter/SKILL.md, чтобы агенты вроде Claude Code использовали его при каждой доработке инструмента.

---
name: build-timestamp-converter
description: Use when building or changing a Конвертер Unix-времени tool. Build a tool that converts between Unix timestamps and human-readable dates.
---

# Build: Конвертер Unix-времени

## Goal

Build a tool that converts between Unix timestamps and human-readable dates.

## Workflow

1. Review the required features, inputs and outputs below and ask about anything missing first.
2. Implement the core logic as pure functions separate from the UI.
3. Check the logic against the test cases in the verification list.
4. Build a responsive UI with an input form, a result area and a Copy button.
5. Reproduce each edge case listed under Rules and refine the error messages.

## Core features

- Timestamp → date and date → timestamp
- Auto-detect seconds (10 digits) or milliseconds (13 digits)
- Show UTC, local and a chosen IANA zone together
- ISO 8601 output
- 'Now' button

## Inputs

- A timestamp or a date and time
- Time zone

## Outputs

- Converted date or timestamp
- ISO 8601 string
- Relative time (e.g. 3 days ago)

## Rules

- Support negative timestamps before 1970
- Handle values after 2038 correctly
- Explain skipped or repeated local times at DST transitions
- Validate non-numeric input
- Build it as a single page (HTML, CSS, JavaScript) that runs entirely in the browser, and never send the user's input to a server.

## Verification

- [ ] 0 → 1970-01-01T00:00:00Z
- [ ] 1700000000 → 2023-11-14T22:13:20Z
- [ ] 1700000000000 (13 digits) is the same instant

Советы по работе с ИИ

  • Укажите стек (React, Vue или чистый HTML) в первой строке, чтобы код подошёл к проекту.
  • Попросите ИИ выполнить перечисленные тесты и показать результаты до принятия кода.
  • Не вставляйте настоящие пароли, данные клиентов и API-ключи; используйте примеры.