Browse Definitions :
Definition

timestamp

What is a timestamp?

A timestamp is the current time of an event that a computer records. Through mechanisms, such as the Network Time Protocol, a computer maintains accurate current time, calibrated to minute fractions of a second. Such precision makes it possible for networked computers and applications to communicate effectively.

The timestamp mechanism is used for a variety of synchronization purposes, such as assigning a sequence order for a multievent transaction so the transaction can be voided if a failure occurs. Another way that a timestamp is used is to record time in relation to a particular starting point in time.

In IP telephony, for example, Real-time Transport Protocol assigns sequential timestamps to voice packets so that they can be buffered by the receiver, reassembled and delivered without error. When writing a program, the programmer is usually provided an application programming interface for a timestamp that the operating system (OS) can provide during program execution.

What are timestamps used for?

Timestamps are used for keeping records of information online or on a computer. A timestamp displays when certain information was created, exchanged, modified or deleted.

The following are examples of how timestamps are used:

  • Computer files may contain a timestamp that shows when the file was last changed.
  • Digital cameras attach timestamps to photographs that show the date and time of day a picture was taken.
  • Social media posts include the date and time the post was made.
  • Online chat and instant messages use timestamps to record the date and time when a message was sent, received or viewed.
  • Blockchain blocks use timestamps to ensure the validity of transactions, such as with cryptocurrencies.
  • Data management relies on timestamps to ensure the integrity and quality of data.
  • Digital contracts and digital signatures use timestamps to show when a document was signed.

Some timestamp uses, such as digital signatures, require a high level of reliability for legal reasons. A trusted third party may generate a timestamp for the document instead of using the time from the machine on which the document is stored. These third parties are known as Time Stamping Authorities. TSAs use public key infrastructure -- the processes and technologies that enable encryption and data signing -- to ensure their timestamps are valid and secure from manipulation.

Different timestamp formats

Timestamps vary depending on the medium in which they're used. Timestamp formats are different across OSes, programming languages, databases and data types.

Some timestamp formats are shown in the following examples, where y stands for year, d for day, h for hour, m for minute and s for second:

  • dd hh mm ss
  • yyyy mm dd hh
  • mm hh
Terraform code example
The infrastructure-as-code tool Terraform enables users to capture a timestamp using the timestamp() function to put the date in a more convenient format.

Here are examples of what a timestamp might look like with those values filled in:

All clocks and time zones worldwide are set based on Coordinated Universal Time (UTC).

A timestamp's format can also be as simple as the read receipts on a text message. The format is something like "Seen 9:18 a.m." This indicates when the recipient saw the message.

Timestamps also differ in the way they are calculated. A computer's internal clock and timestamp values are determined based on an epoch. A computer's date and time are determined based on the number of seconds that have passed since that computer's defined epoch. The epoch's time corresponds to 0 hours, 0 minutes and 0 seconds UTC, and the epoch date depends on the OS used.

For example, the Unix epoch date is Jan. 1, 1970, so Unix systems calculate timestamps relative to this date. On Windows computers, the epoch date is Jan. 1, 1601, and on older Macintosh computers, the epoch date is Jan. 1, 1904.

How do I convert a timestamp?

Web users can easily convert a Unix epoch timestamp to a human-readable date and vice versa using a free online conversion tool. For example, if the Unix epoch time is 1639172876 seconds, then the human date would be Friday, Dec. 10, 2021, at 9:47:56 p.m. This timestamp written in a dd mm yyyy hh mm ss format would be 10-12-2021 9:47:56.

If a user has a list of Unix timestamps in Excel, they can convert the timestamps into human-readable dates using the following formula: (A1-DATE(1970,1,1))*86400, where the Unix timestamps are in column A. Users can enter that formula in a blank cell in Excel to convert the timestamp into a date and then press the enter key.

Various programming languages have different ways of converting a Unix timestamp. A timestamp's default format in Java might be different than a timestamp's default format in Python, and each language has different ways of calling those timestamps.

Timestamps in blockchain

Timestamps play an important role in blockchain, particularly in its use with cryptocurrencies. Each block in the blockchain has a header, which contains the Unix time that the block was hashed. The timestamp gives each block a unique mark and prevents double spending.

Blockchain is also used in other applications, such as content timestamping. In this context, blockchain-based timestamps prove the content on a page was published at the timestamped date. Blockchain can also be used in elections to prove the validity of a vote and help eliminate fraud.

Blockchain mining

Unix timestamps are used to show how long it took to mine a block, which determines how much revenue the miner gets. Miners gain revenue by producing blocks quickly.

It's possible for a bitcoin miner to change a timestamp while hashing it to make it appear as though the block was created faster than it actually was. However, the following two rules prevent miners from doing this:

  1. The median past time rule requires the timestamp be higher than the median of the timestamps of the past 11 blocks. In other words, they would need to calculate the hashes of six of the past 11 blocks.
  2. The future block time rule requires the timestamp cannot be more than two hours in the future from the miner's computer's local time.

Rule No. 1 ensures that the chain moves forward at a steady rate. Rule No. 2 ensures that the chain doesn't move too far forward. Both rules allow block generation to happen at a steady rate. They make it difficult for miners and other blockchain users to manipulate their timestamps.

Blockchain technology isn't foolproof. Learn about some blockchain security threats businesses should prepare for.

This was last updated in December 2021

Continue Reading About timestamp

Networking
  • subnet (subnetwork)

    A subnet, or subnetwork, is a segmented piece of a larger network. More specifically, subnets are a logical partition of an IP ...

  • Transmission Control Protocol (TCP)

    Transmission Control Protocol (TCP) is a standard protocol on the internet that ensures the reliable transmission of data between...

  • secure access service edge (SASE)

    Secure access service edge (SASE), pronounced sassy, is a cloud architecture model that bundles together network and cloud-native...

Security
  • cyber attack

    A cyber attack is any malicious attempt to gain unauthorized access to a computer, computing system or computer network with the ...

  • digital signature

    A digital signature is a mathematical technique used to validate the authenticity and integrity of a digital document, message or...

  • What is security information and event management (SIEM)?

    Security information and event management (SIEM) is an approach to security management that combines security information ...

CIO
  • product development (new product development)

    Product development -- also called new product management -- is a series of steps that includes the conceptualization, design, ...

  • innovation culture

    Innovation culture is the work environment that leaders cultivate to nurture unorthodox thinking and its application.

  • technology addiction

    Technology addiction is an impulse control disorder that involves the obsessive use of mobile devices, the internet or video ...

HRSoftware
  • organizational network analysis (ONA)

    Organizational network analysis (ONA) is a quantitative method for modeling and analyzing how communications, information, ...

  • HireVue

    HireVue is an enterprise video interviewing technology provider of a platform that lets recruiters and hiring managers screen ...

  • Human Resource Certification Institute (HRCI)

    Human Resource Certification Institute (HRCI) is a U.S.-based credentialing organization offering certifications to HR ...

Customer Experience
  • contact center agent (call center agent)

    A contact center agent is a person who handles incoming or outgoing customer communications for an organization.

  • contact center management

    Contact center management is the process of overseeing contact center operations with the goal of providing an outstanding ...

  • digital marketing

    Digital marketing is the promotion and marketing of goods and services to consumers through digital channels and electronic ...

Close