SCS-CBU-CED-IAM / mobileid-helper

Mobile ID Test Signature Portal
1 stars 1 forks source link

Add the Timezone to the instant in the request #43

Closed FreddyKaiser closed 11 years ago

FreddyKaiser commented 11 years ago

If no UTC relation information is given with a time representation, the time is assumed to be in local time. While it may be safe to assume local time when communicating in the same time zone, it is ambiguous when used in communicating across different time zones. It is usually preferable to indicate a time zone (zone designator) using the standard's notation.

FreddyKaiser commented 11 years ago

Instead of

/* Set the AP instant */
$timestamp = time();
$this->ap_instant = date('Y-m-d', $timestamp).'T'.date('H:i:s', $timestamp);

something like:

$this->ap_instant = date('Y-m-d', $timestamp).'T'.date('H:i:sP', $timestamp);

or just ISO-8601:

$this->ap_instant = date('c', $timestamp);