# get_server_time (/docs/products/ussd-flows/developers/templates/get-server-time)

The `get_server_time` template gets the current time and stores it as the page value. Use it when you want to show the subscriber when something happened.

## Configuration

This template takes no `template_data` and shows nothing on screen, so `label` isn't needed:

```json
{
  "id": "fetch_time",
  "component": {
    "type": "template",
    "template_name": "get_server_time"
  }
}
```

## What It Returns

The page value is the current time in UTC, for example `Fri, 30 Oct 2026 14:32:10 GMT`. Read it with `$(page.PAGE_ID.value)`.

To use the time inside an expression, for example to get the hour, use `datetime.now()` or `datetime.extract(...)` instead. See [Expressions](/docs/products/ussd-flows/developers/expressions).

## Example: Time on a Receipt Screen

```json
{
  "version": "1.0",
  "pages": [
    {
      "id": "make_payment",
      "component": {
        "type": "template",
        "label": "Enter your $(session.network_provider_name) PIN to pay {{amount}} for your Lumley Power top-up.",
        "template_name": "collect_payment",
        "template_data": {
          "payment_target_ref": "7150001234",
          "amount": 50
        }
      }
    },
    {
      "id": "get_time",
      "component": {
        "type": "template",
        "template_name": "get_server_time"
      }
    },
    {
      "id": "receipt",
      "component": {
        "type": "display",
        "label": "Paid SLE 50.\nRef: $(page.make_payment.value)\nTime: $(page.get_time.value)"
      }
    }
  ]
}
```
