From ggrothendieck at gmail.com  Mon Nov 27 14:21:03 2006
From: ggrothendieck at gmail.com (Gabor Grothendieck)
Date: Mon, 27 Nov 2006 08:21:03 -0500
Subject: [Rd] as.Date: conversion pb from POSIXct (PR#9386)
In-Reply-To: <20061127130825.0CDE33F043@slim.kubism.ku.dk>
References: <20061127130825.0CDE33F043@slim.kubism.ku.dk>
Message-ID: <971536df0611270521x7d88dd0fg8bc0bc7e174edf80@mail.gmail.com>

as.Date is converting your object with respect to GMT time zone and in
that time zone your POSIXct date is the day before.  See ?as.Date and also
suggest you read R News 4/1 help desk article.


On 11/27/06, xiao.gang.fan1 at free.fr <xiao.gang.fan1 at free.fr> wrote:
> Full_Name: Xiao Gang FAN
> Version: 2.4.0
> OS: Windows
> Submission from: (NULL) (159.50.101.9)
>
>
> > library(chron)
> > as.Date(as.POSIXct(strptime("1994-01-24","%Y-%m-%d")))
> [1] "1994-01-23"
>
> ______________________________________________
> R-devel at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-devel
>



[Rd] as.Date: conversion pb from POSIXct (PR#9386)
Gabor Grothendieck