Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error in roundTime: "POSIXt" %in% class(time) is not TRUE #18

Closed
Wesseldr opened this issue Aug 19, 2022 · 5 comments
Closed

Error in roundTime: "POSIXt" %in% class(time) is not TRUE #18

Wesseldr opened this issue Aug 19, 2022 · 5 comments
Assignees

Comments

@Wesseldr
Copy link

Wesseldr commented Aug 19, 2022

Hi,

Just a little breaking change I ran into between version 1.0.1 and 1.0.2, sticking to the examples probably would help in the first place ;-)

Working in version 1.0.1

timeInput("or_start_time", "Range Start time:",
        seconds = FALSE,
        minute.steps = 1,
        value = as_hms("9:00:00") # as_hms is from the hms library
      ),

In version 1.0.2 if fails with an error:
"Error in roundTime: "POSIXt" %in% class(time) is not TRUE"

From version 1.0.2+ the use of as_hms seems to stop working and is best to use the strptime("9:00:00", "%T") function.

New structure that works again, not using the as_hms any more and use strptime

timeInput("or_start_time", "Range Start time:",
        seconds = FALSE,
        minute.steps = 1,
        value = strptime("9:00:00", "%T")
      ),
@burgerga burgerga self-assigned this Aug 19, 2022
@burgerga
Copy link
Owner

burgerga commented Aug 19, 2022

Ah that is annoying, supporting hms would be nice indeed. It seemed like an easy fix, but unfortunately on my first attempt the timezone problems return (#11).
So I need to write some more unit tests over the weekend ;)

@burgerga
Copy link
Owner

burgerga commented Aug 19, 2022

I think I fixed it, can you try with remotes::install_github("burgerga/shinyTime")?
(bonus: character input)

@Wesseldr
Copy link
Author

Wesseldr commented Aug 19, 2022

YES! Works like a charm :-) Both hms and the bonus character input :-)

Issue can be closed is resolved in: 1.0.2.9000

Thnx! for the "mega snelle fix ;-)"

@burgerga
Copy link
Owner

No problem, will try to send it to CRAN asap :)

@burgerga
Copy link
Owner

1.0.3 accepted by CRAN, should be available in the coming hours ;)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants