Error in Utils$rfc2822

3 views
Skip to first unread message

Michele

unread,
Dec 5, 2013, 9:28:11 AM12/5/13
to rr...@googlegroups.com
From `?Utils` 


> Sys.time()
[1] "2013-12-05 14:26:59 GMT"

> Utils$rfc2822(Sys.time())
""

Is the above expected? This causes problems in set and delete cookies...

Michele

unread,
Dec 5, 2013, 9:34:08 AM12/5/13
to rr...@googlegroups.com
> Utils$rfc2822
Class method definition for method rfc2822()
function (ts = NULL) 
{
    if (is.null(ts) || !inherits(ts, "POSIXt")) 
        base::stop("Need a POSIXt object")
    format(ts, format = "%a, %d %b %Y %T GMT", tz = "GMT")
}

According to `format.POSIXct` %T  is not implemented in windows and therefore it should be replace with %H:%M:%S

Jeffrey Horner

unread,
Dec 5, 2013, 9:46:02 AM12/5/13
to rr...@googlegroups.com
You must have something wrong with your machine's locale config, time
zone config, or your R config. Utils$rfc2822 does nothing more than:

> Utils$rfc2822
Class method definition for method rfc2822()
function (ts = NULL)
{
if (is.null(ts) || !inherits(ts, "POSIXt"))
base::stop("Need a POSIXt object")
format(ts, format = "%a, %d %b %Y %T GMT", tz = "GMT")
}

Can you provide more details about your setup?
> --
> You received this message because you are subscribed to the Google Groups
> "rRook" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to rrook+un...@googlegroups.com.
> For more options, visit https://groups.google.com/groups/opt_out.

Jeffrey Horner

unread,
Dec 5, 2013, 9:50:08 AM12/5/13
to rr...@googlegroups.com
Ah. thanks for that:

Jeffrey Horner

unread,
Dec 5, 2013, 9:50:40 AM12/5/13
to rr...@googlegroups.com
Meant to add the link to the fix on github:

https://github.com/jeffreyhorner/Rook/commit/d9948d1c0eeb5e8287d5215766ff4f4bdafc53ed

On Thu, Dec 5, 2013 at 8:34 AM, Michele <carrier...@gmail.com> wrote:

Michele

unread,
Dec 5, 2013, 9:59:08 AM12/5/13
to rr...@googlegroups.com
Oh hi, didn't refresh before wirting my second message.

Thanks for the quick response. I'll compile Rook with Rtools (finger crossed :-) ).  I hope that will fix the issue I am having with deleting cookies. It should be so, because in set_cookie_header there is rfc2822(expires), where expires comes from timezero().

I'll be back in case... thanks again for Rook and still don't get the low usage of this package! At least according the very few question on SO and here.

Cheers,

Michele.
Reply all
Reply to author
Forward
0 new messages