Description Usage Arguments Value Examples
View source: R/utc_offset_berlin.R
For local timestamps (character) in the format "yyyy-mm-dd HH:MM:SS"
,
of which is known that they are recorded in time zone Europe/Berlin, i.e. CET
in winter and CEST in summer, the UTC offset (i.e. "+1"
in winter
and "+2"
in summer) is determined. Therefore, it is required that
the timestamps
are ordered by time, which should be the case if they
were recorded by a measuring device. Use this function to create unique
timestamps by adding their UTC offset.
1 | utcOffsetBerlinTime(timestamps)
|
timestamps |
vector of character representing timestamps in format
|
vector of elements "+0100"
or "+0200"
, depending on
whether the timestamps at corresponding positions in timestamps
are
in CET or CEST, respectively.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 | # Change from CET to CEST
utcOffsetBerlinTime(c(
"2017-03-26 01:58:00",
"2017-03-26 01:59:00",
"2017-03-26 03:00:00", # jump from 02:00 to 03:00
"2017-03-26 03:01:00",
"2017-03-26 03:02:00"
))
#> "+0200" "+0200" "+0100" "+0100" "+0100"
# Note that the following timestamps do not exist in Europe/Berlin timezone
# and would result in an error
## Not run:
utcOffsetBerlinTime(c(
"2017-03-26 02:00:00",
"2017-03-26 02:15:00",
"2017-03-26 02:30:00",
"2017-03-26 02:45:00"
))
## End(Not run)
#> "+0200" "+0200" "+0200" "+0200"
# Change from CEST to CET
utcOffsetBerlinTime(c(
"2017-10-29 01:30:00", # CEST
"2017-10-29 02:00:00", # first time: CEST
"2017-10-29 02:30:00", # first time: CEST
"2017-10-29 02:00:00", # second time: CET
"2017-10-29 02:30:00" # second time: CET
))
#> "+0200" "+0200" "+0200" "+0100" "+0100"
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.