The R Project SVN R

Rev

Rev 10854 | Rev 35101 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 10854 Rev 28166
Line 1... Line 1...
1
\name{Sys.time}
1
\name{Sys.time}
2
\alias{Sys.time}
2
\alias{Sys.time}
-
 
3
\alias{Sys.Date}
3
\alias{Sys.timezone}
4
\alias{Sys.timezone}
4
 
5
 
5
\title{Get Current Time and Timezone}
6
\title{Get Current Date, Time and Timezone}
6
\description{
7
\description{
7
  \code{Sys.time} returns the system's idea of the current time and
8
  \code{Sys.time} and \code{Sys.Date} returns the system's idea of the
-
 
9
  current date with and without time, and \code{Sys.timezone} returns
8
  \code{Sys.timezone} returns the current time zone.
10
  the current time zone.
9
}
11
}
10
\usage{
12
\usage{
11
Sys.time()
13
Sys.time()
-
 
14
Sys.Date()
12
Sys.timezone()
15
Sys.timezone()
13
}
16
}
-
 
17
\details{
-
 
18
  \code{Sys.time} returns an absolute date-time value which can be
-
 
19
  converted in various time zones and may return different days.
-
 
20
 
-
 
21
  \code{Sys.Date} returns the day in the current timezone.
-
 
22
}
14
\value{
23
\value{
15
  \code{Sys.time} returns an object of class \code{"POSIXct"} (see
24
  \code{Sys.time} returns an object of class \code{"POSIXct"} (see
16
  \link{DateTimeClasses}).
25
  \link{DateTimeClasses}).
17
 
26
 
-
 
27
  \code{Sys.Date} returns an object of class \code{"Date"} (see \link{Date}).
-
 
28
 
18
  \code{Sys.timezone} returns an OS-specific character string, possibly
29
  \code{Sys.timezone} returns an OS-specific character string, possibly
19
  an empty string.
30
  an empty string.
20
}
31
}
21
\seealso{
32
\seealso{
22
  \code{\link{date}} for the system time in a fixed-format character
33
  \code{\link{date}} for the system time in a fixed-format character
Line 25... Line 36...
25
\examples{
36
\examples{
26
Sys.time()
37
Sys.time()
27
## locale-specific version of date()
38
## locale-specific version of date()
28
format(Sys.time(), "\%a \%b \%d \%X \%Y")
39
format(Sys.time(), "\%a \%b \%d \%X \%Y")
29
 
40
 
-
 
41
Sys.Date()
-
 
42
 
30
Sys.timezone()
43
Sys.timezone()
31
}
44
}
32
\keyword{utilities}
45
\keyword{utilities}
33
\keyword{chron}
46
\keyword{chron}