shinyTime icon indicating copy to clipboard operation
shinyTime copied to clipboard

returns a POSIXlt?

Open mlgrm opened this issue 3 years ago • 1 comments

It looks like the timeInput() object returns a POSIXlt object even when set with a POSIXct object. Is this intentional? I ask because the listish POSIXlt object is harder to work with in data frames and tibbles than the atomic POSIXct and, in my case, resulted in a hard-to-pin-down bug. (Of course, that may just be my lack of familiarity with date-time objects...)

mlgrm avatar Oct 08 '21 13:10 mlgrm

Sorry for the late reply, my notification settings were all wrong and I didn't get notifications for new issues. I don't keep track of how the widget was initialized, but if you want to use POSIXct just use as.POSIXct on the output of the widget, that is indeed more efficient in data frames and tibbles.

I will probably add a note about this in the documentation because it is a good point. I will leave the issue open for now, maybe in the feature I can think about it some more :)

burgerga avatar Jul 20 '22 20:07 burgerga