# viewerTime

> Why JS: a server cannot know the viewer's time zone or clock, so a relative time it renders names the server's zone.

```ts
import { viewerTime } from "@sdxc/ui/mixins";
```

Rewrites the host `<time>` from its own `datetime` once it is live in a document, and after
every update around it: the date and title in the viewer's zone, the text against `now` when
given and the viewer's clock otherwise, so a fixed reference reads the same on every machine.

## Signature

```ts
viewerTime(arg0: ViewerTimeArgs): MixinDescriptor<HTMLTimeElement>
```

## Parameters

| Parameter | Type | Description |
| --- | --- | --- |
| `arg0` | `ViewerTimeArgs` |  |

## Examples

```tsx
<time dateTime={iso} mix={[viewerTime(locale, now)]}>{serverText}</time>
```
