Do you check in your browser to see whatthe cookie looks like? Also, at the bottom of my pages, in my admin area,= I list cookies (along with formvariables andlistvariables) to see what's going on. This might help you troubleshoot. =I have always used the date format thatincludes a dash (e.g.,=A0
Terry
On Tue, 20 Oct 2009 08:39:57-0600
Govinda <govinda.webdnatalk@gmail.com> wrote:
>
> On Oct 20, 2009, at 7:44 AM, KennethGrome wrote:
>
>>> You should also try to just put the= date/time code:
>>> [format=20days_to_date %A,
>>>%d-%b-%Y]
[math]{
[date]}+7[/math][/format=]
>>> [math time]{
[time]}+{00:00:00}[/math] GMT
>>> as text on a test page to =see what output the code
>>>actually produces
>>> (but I suppose you've a=lready tried that).
>>
>> Youcan also remove the "+{00:00:00}" part since it's
>>not doing =
>> anythinganyways.
>>
>> I've found that my cookies never need sp=ecific time
>>cutoffs
>>anyways. If this is true for you, you can change the
>>"[math =time]
>> {
[time]}+{00:00:00}[/math]" part to "12:00:00"
>>or"07:21:53" or any
>> other =valid HH:MM:SS timevalue.
>>
>> As far as the date itself is concerned thi=s has always
>>worked for=20
>> me, and this is the specified date format in the webdna
=>>docs:
>>
>> [formatdays_to_date %A, %d-%b-%Y]
>>
>> ... but it seems to be= different from what other
>>programming
>> languages recommend because most of= the others seems to
>>suggest=20
>> using this:
>>
>> [format days_to_date %a,= %d %b %Y]
>>
>> ... so maybethe webdna docs are outdated.
>>
>> Or maybe most web b=rowsers simply do not care that much
>>about the
>> specific date format in a cookie beca=use they can
>>probably "figure=20
>> it out" if it's not perfect anyways.
>>
>>= Either way you should probably check yourserver time
>>for accuracy,
>> because if the server= time got off for some reason your
>>cookies
>> could be expiring sooner or later than =expected.
>
>
>Frank andKen, thank you both for taking a stab at this!
>
> I have tr=ied all you suggest, and more.. but still, 95%
>of the time, that cookie is being set to expire at end
>=of session despite the fact that it looks tome like it
>is supposed to expire on the date I am telling it to.=
> Weird. I did originally pull thatcookie code straight
>from the docs.. and it even sets the expir=ation date to
>when I tell it to, oncein a while!! That is the extra
>weird part! Frank, here is a sa=mple of that date/time
>code (what itreturns.. as part of a the whole cookie,
>with [] changed to pip=es:
>
> <!--|setcookie
>name=3DlastVisitedProdMenuPage&value=3D
[thisurl]&expires=3D[forma=t
> days_to_date %A, %d %b
>%Y]
[math]{
[date]}+7[/math][/format] [math time]
>{
[time]}+={00:00:00}[/math] GMT&path=3D/|-->
>
> <!--|setcookie
>name=3DlastVisitedProdMenuPage&val=ue=3D/html_docs/
>maintenanceprogramvideo.html&expires=3DSunda=y,26 Oct 2009
>16:00:19 GMT&path=3D/|-->
>
> (I= tried with and without the hyphen char inbetween the
>date parts.. and I tried changing the %A into %a...=
>still no luck.. still says they=20expire at end of
>session)
>
> Ken, at this point, I =will be happy if I can just get
>thecookie to expire some days AFTER today.. regardless
>of the time=.
>
> I checked FF and safari(Mac).. both are not setting
>the expire date.
>
> W=ould one of you be willing to take my exactcode, here
>this:
> [setcookie name=3DlastVisitedProdMenuPag=e&expires=3D[format
>days_to_date %a,%d %b
>%Y]
[math]{
[date]}+7[/math][/format] 10:00:00
[!]---[math
>time] {
[time]}+{00:00:00}[/math]---[/!]
>GMT&path=3D/&value=3D
[thisurl]]
>
> and stic=k it on one of your pages and tell me what you
>get on your cookie sheet? Does it set to expire 7 days
>=out? ..or at end of session?
> Do youhave any cookies successfully expiring some days
>out? If so, ca=n I see that code?
>
>------------
> Govinda
> govinda.webdnatalk@gmail.com
>=
>
>
>
>---------------------------------------------------------
> This me=ssage is sent to you because you are subscribed
>to
> the mailing list <talk@webdna.us>.
> To un=subscribe, E-mail to:<talk-leave@webdna.us>
> archives: http://mail.webdna.us/list=/talk@webdna.us
> old archives:http://dev.webdna.us/TalkListArchive/
> Bug Reporting:
>http=://forum.webdna.us/eucabb.html?page=3Dtopics&category=3D288
=A0=