---
name: "ns_httptime"
section: "3"
platform: "linux"
package: "aolserver4"
version: "4.0.10-7"
release: "Debian 4.0 (Etch)"
platforms: ["linux"]
url: "https://new.carta.tech/ns_httptime"
---

# ns\_httptime(3)

commands

```

```

## NAME

ns\_httptime, ns\_parsehttptime - commands

## SYNOPSIS

**ns\_httptime** *time*

**ns\_parsehttptime** *httptime*

```

```

## DESCRIPTION

**ns\_httptime**

This function converts the time (specified as the number of seconds from 00:00:00 UTC, January 1, 1970) to the appropriate format for an HTTP header or log file. The time and date is returned with a four digit year, for example: "Sun, 06 Nov 1994 08:49:37 GMT".

**ns\_parsehttptime**

ns\_parsehttptime takes a properly formatted HTTP time and returns the number of seconds since 00:00:00 UTC Jan 1, 1970.

## EXAMPLES

**ns\_httptime**

```

set time [ns_httptime [ns_time]]
Returns: Thu, 14 Nov 2002 17:29:06 GMT
```

**ns\_parsehttptime**

```

set time "Thu, 14 Nov 2002 17:29:06 GMT"
ns_parsehttptime $time
Returns: 1037294946
```

## SEE ALSO

ns\_time(n)

## KEYWORDS

time
