[ic] Cookie Setting Not Working

Jason Kohles interchange-users@lists.akopia.com
Tue May 29 09:15:01 2001


On Sun, May 27, 2001 at 04:42:13PM -0400, Jim Balcom wrote:
> On Wed, 23 May 2001, David Totten wrote:
> 
> DT>>[set-cookie name=MV_USERNAME value="" expire="Tue, 03-Apr-2001 17:00:00 GMT"]
> DT>>
> DT>>Taken from some of the new 4.8 docs is this exerpt:
> 
> Supposing that you want the cookie to expire 10 hours after it is set?
> 
There are actually two ways you can do this...

The best way is probably to use the time tag:

[tmp expires][time gmt=1 adjust="+10"]%a, %d-%b-%Y %H:%M:%S GMT[/time][/tmp]

The only downside is that you have to remember the date format.

The easy, but undocumented way is that set-cookie will take an epoch time
as an expiration date...

[tmp expires][time gmt=1 adjust="+10"]%s[/time][/tmp]

Either of these will give you a value that set-cookie will accept as an
expiration:

[set-cookie value="test" name="test" expire="[scratch expires]"]

-- 
Red Hat E-Business Solutions                    Jason Kohles
11480 Sunset Hills Road                         Senior System Architect
Reston, VA 20190                                jkohles@redhat.com