[ 
https://issues.apache.org/jira/browse/ARROW-14827?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17488815#comment-17488815
 ] 

Dragoș Moldovan-Grünfeld commented on ARROW-14827:
--------------------------------------------------

[~westonpace] In R for a "timestamp without timezone" it returns FALSE (because 
it assumes UTC). For x being of class "Date":
{code:r}
x <- lubridate::ymd("2012-03-26")
x
#> [1] "2012-03-26"
class(x)
#> [1] "Date"
attributes(x)
#> $class
#> [1] "Date"
attr(x, "tzone")
#> NULL
lubridate::dst(x)
#> [1] FALSE
{code}
the default (and single) method converts the input to a {{POSIXlt}} object, 
which stores DST info in its {{$isdst}} slot.
{code:r}
x <- lubridate::ymd("2012-03-26")
print.default(as.POSIXlt(x))
#> $sec
#> [1] 0
#> 
#> $min
#> [1] 0
#> 
#> $hour
#> [1] 0
#> 
#> $mday
#> [1] 26
#> 
#> $mon
#> [1] 2
#> 
#> $year
#> [1] 112
#> 
#> $wday
#> [1] 1
#> 
#> $yday
#> [1] 85
#> 
#> $isdst
#> [1] 0
#> 
#> attr(,"class")
#> [1] "POSIXlt" "POSIXt" 
#> attr(,"tzone")
#> [1] "UTC"
{code}

> [C++] Temporal component extraction function for extracting dst indicator
> -------------------------------------------------------------------------
>
>                 Key: ARROW-14827
>                 URL: https://issues.apache.org/jira/browse/ARROW-14827
>             Project: Apache Arrow
>          Issue Type: Improvement
>          Components: C++
>            Reporter: Nicola Crane
>            Priority: Minor
>              Labels: good-second-issue, kernel
>
> This would return "true" if DST is in effect at the given date and "false" if 
> DST is not in effect.



--
This message was sent by Atlassian Jira
(v8.20.1#820001)

Reply via email to