☰
Documentation

gwp_current_timestamp

Returns the current time measured in the number of seconds since the Unix Epoch (January 1 1970 00:00:00 GMT).

{gwp_current_timestamp}

This merge tag has no options and does not need an entry, so it also works in default values, HTML fields and, with the post content setting enabled, in page content. Type it exactly as shown: {gwp_current_timestamp}. For a formatted or shifted date and time, use gwp_now, for example {gwp_now format="U"} for the same timestamp or {gwp_now format="d-m-Y H:i"} for a readable date.

Frequently Asked Questions

How can I display or store the current timestamp using gwp_current_timestamp?

You can use the {gwp_current_timestamp} merge tag to return the current time as a number of seconds since the Unix Epoch (January 1, 1970, 00:00:00 UTC). This is useful if you want to display the timestamp at the time of submission, or store it automatically in a field. Based on our tests, this merge tag works perfectly in both confirmation messages and as a default value in form fields. Example: Current Timestamp: {gwp_current_timestamp} To store it in a field, use a Hidden field with this default value: {gwp_current_timestamp}

What does the timestamp number actually mean?

The timestamp is a simple number representing the exact number of seconds that have passed since January 1, 1970, at 00:00:00 UTC. It does not display a human-readable date or time directly, but you can easily convert it later if needed. Example: 1717754728

When is the timestamp generated?

The timestamp is generated at the exact moment the merge tag is processed. For confirmations and notifications, this will reflect the submission time. In the default value of a Hidden field, it is filled in when the form is displayed, so the stored value is the time the form was loaded. Example: {gwp_current_timestamp}

Can I display the timestamp in both the confirmation message and the entry details?

Yes. You can display {gwp_current_timestamp} in confirmation messages and notifications, and store it in a Hidden field for reporting or later reference. Example (confirmation message): Current Timestamp: {gwp_current_timestamp} Example (Hidden field default value): {gwp_current_timestamp}

Why is the timestamp not formatted as a regular date and time?

The merge tag is designed to output the raw timestamp for flexibility. This format is ideal for storing time data consistently and is easy to convert to any human-readable format using external tools or code. Example: {gwp_current_timestamp}

Frequently Asked Questions
Proudly powered by WordPress