Convert a date to and from a unix timestamp and view the date in different formats (ISO 8601, RFC 3339, RFC 822/2822). You can also format the date in a custom format using the date-fns library patterns.
Format | Result | |
---|---|---|
ISO 8601, RFC 3339 | 2024-10-31T10:15:41.637+00:00 date-fns format: yyyy-MM-dd'T'HH:mm:ss.SSSxxx | |
RFC 822/2822 | Thu, 31 Oct 2024 10:15:41 +0000 date-fns format: EEE, dd MMM yyyy HH:mm:ss xx | |
Unix timestamp (s) | 1730369741 date-fns format: t | |
Unix timestamp (ms) | 1730369741637 date-fns format: T |
Mockoon is a powerful and user-friendly API mocking tool designed for developers and teams to streamline their development process. With Mockoon, you can effortlessly create and manage mock APIs, allowing for rapid prototyping and testing without the need for a live backend.
Its intuitive interface lets you quickly set up mock servers, customize responses, and simulate different scenarios, all in real-time. By integrating Mockoon into your workflow, you can enhance collaborationamong team members, reduce development time, and ensure a smoother, more efficient testing phase.
This tool allows you to convert a date to a unix timestamp (seconds or milliseconds) and vice versa, and view the date in different formats (ISO 8601, RFC 3339, RFC 822/2822). You can also format the date in a custom format using the date-fns library format.
A Unix timestamp (or epoch time) is the number of seconds or milliseconds that have elapsed since 00:00:00 Coordinated Universal Time (UTC), Thursday, 1 January 1970. It is used in many programming languages and systems to represent dates and times.
Unix timestamps are often used in APIs to represent dates and times because they are easy to work with and can be converted to any time zone.
date-fns is a modern JavaScript date utility library that provides comprehensive, yet simple and consistent toolset for manipulating JavaScript dates in a browser or Node.js environment.
It is used in this tool to format dates and unix timestamps in different formats using predefined patterns. You can find the list of available patterns in the date-fns documentation.