convertToWinterUTC: convertToWinterUTC

Description Usage Arguments Details Value Author(s) See Also Examples

View source: R/timePosixCt.R

Description

deprecated: convert series to winter time, i.e. expressed as GMT

Usage

1
convertToWinterUTC(x, hourOffset = -1)

Arguments

x

POSIXct vector using summer time

hourOffset

offset of the original time zone winter time

Details

R plots time zones with summer and winter time automatically switching to summer time. This is annoying in plots of hours across the time shift. Remedy is to express hours in GMT, which has no summer time. Note, however, that the time not comparable acress time zones any more and you must compare only against times with time zone GMT.

Better switch session to a time zone without DTS (see setSessionCETWintertime)

Value

POSIXct vector in winter time (expressed as GMT, so actually offset to absolute world time)

Author(s)

Thomas Wutzler

See Also

strptimeNoSummer, twMisc

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
# this example was constructed for system time zone beeing "CET"
tmpd<- c("2010-03-28 00:00:00"
    ,"2010-03-28 01:00:00"
    ,"2010-03-28 02:00:00"
    ,"2010-03-28 03:00:00"
    ,"2010-03-28 04:00:00"
)
# note the shift from 1 to 3 in the first next line
(tmp.cet2 <- strptimeNoSummer(tmpd))
(tmp.winter <- convertToWinterUTC(tmp.cet2))
# note the wrong second- and third-last FALSE
tmp.winter < as.POSIXct("2010-03-28 04:00:00")
# correct is to compare to GMT based time
tmp.winter < as.POSIXct("2010-03-28 04:00:00",tz="GMT")

twMisc documentation built on May 2, 2019, 6:11 p.m.