[R] Different time between date() and Sys.date()
David Winsemius
dwinsemius at comcast.net
Thu Oct 21 15:07:29 CEST 2010
On Oct 21, 2010, at 6:19 AM, omerle wrote:
> Hi,
>
> I got two different times between these functions :
>> date()
> [1] "Thu Oct 21 12:11:37 2010"
>> Sys.time()
> [1] "2010-10-21 10:11:40 GMT"
>>
>
> I know that its because I did Sys.setenv(TZ="GMT"). Even if my
> system is set by default at CEST.
> I think that the difference between date() and Sys.time() is equal
> to the difference between CEST and GMT.
> I would like to get the time of my machine even if I set GMT as a
> time zone with the Sys.time() function.
> How can I get the real time from the Sys.time() function ?
> Or I can really set my time zone to GMT to get the real time with
> Sys.time() ?
> Sys.time()
[1] "2010-10-21 09:04:40 EDT"
> as.POSIXlt(Sys.time(), tz="GMT")
[1] "2010-10-21 13:06:40 GMT"
>
> Thanks,
>
> Olivier Merle
>
> Une messagerie gratuite, garantie à vie et des services en plus, ça
> vous tente ?
> Je crée ma boîte mail www.laposte.net
>
> [[alternative HTML version deleted]]
>
> ______________________________________________
> R-help at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
David Winsemius, MD
West Hartford, CT
More information about the R-help
mailing list