# Akamai\Open\EdgeGrid\Authentication\Timestamp

#### Generates an Akamai formatted Date for each request

## Synopsis

class Timestamp {

- // members
- protected DateTime $timestamp;
- protected string $validFor = 'PT10S';

- // methods
- public void __construct()
- public bool isValid()
- public $this setValidFor()
- public string __toString()

}

## Coverage

Methods | 100% | 4 / 4
Lines | 100% | 8 / 8

## Members

#### protected

- $timestamp — \DateTime
- $validFor — string

## Methods

#### public

- __construct() — Signing Timestamp
- __toString() — Return the timestamp when cast to string
- isValid() — Return true is timestamp is less than 10s old
- setValidFor() — Set how long the current timestamp is considered valid