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

date times from before 1901 are converted to NA values #31

Open
aylapear opened this issue Nov 7, 2023 · 0 comments
Open

date times from before 1901 are converted to NA values #31

aylapear opened this issue Nov 7, 2023 · 0 comments

Comments

@aylapear
Copy link
Member

aylapear commented Nov 7, 2023

There is a limitation on the size integers can be stored which causes the package fails as the integer goes over the allowed size, this occurs between "1901-12-13 00:00:01" and "1901-12-14 00:00:01" .

> as.integer(as.POSIXct("1901-12-13 00:00:01"))
[1] NA
Warning message:
NAs introduced by coercion to integer range 
> as.integer(as.POSIXct("1901-12-14 00:00:01"))
[1] -2147443199

This can be seen when using the dtt_date_time() function.

dtt_date_time("1901-12-13 00:00:01")
dtt_date_time("1901-12-14 00:00:01")

This is just a limitation of the package due to storing dates/times as integers, since this is core to the package this behaviour is not expected to be changed at this time.

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

1 participant