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

Failure on trying to log dates #29

Open
abudis opened this issue Jan 18, 2022 · 1 comment
Open

Failure on trying to log dates #29

abudis opened this issue Jan 18, 2022 · 1 comment

Comments

@abudis
Copy link

abudis commented Jan 18, 2022

Hey 👋

I noticed that logging started to fail when I pass dates:

loginfo(as.Date("2022-01-01"))
Error in as.Date.default(e) : 
  do not know how to convert 'e' to class "Date"

I think this happened once I upgraded R to 4.1.2 from 3.6.3.

Is that a known issue, or are we not supposed to pass dates anymore?

Thanks!

@mfrasca
Copy link
Contributor

mfrasca commented May 20, 2024

Hi. I was checking how was doing this project of mine, and I thought I would review some open issues.
This one does not look related to r-logging, but to the conversion from string to Date in your system.
I'm using R 4.0.4 (2021-02-15) for duplicating your error and on my system the conversion from string to Date seems to go through as.Date.character, not as.Date.default.
If I force execution of as.Date.default("2022-01-01")) I get the same error as yours.
Anyhow, the error occurs before you enter the r-logging code.
My 2¢ hint: try to understand why you're hitting as.Date.default, it may be some setting somewhere (sorry if I can't offer you more help) and consider explicitly invoking as.Date.character in your code.

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

No branches or pull requests

2 participants