8000 Time only POSIXct columns end up a day out · Issue #58 · ropensci/writexl · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
Time only POSIXct columns end up a day out #58
Open
@sch56

Description

@sch56

Excel has a legacy of considering 29-Feb-1900 as a leap year day, when it didn't exist.
When I read a column with date/time format and value 0.25 (which appears in Excel time format as 6:00:00 AM) with readxl it creates a POSIXct column.
$ CPUTM_MKPF : POSIXct[1:336433], format: "1899-12-31 06:00:00"
When I write this back out to excel using writexl it is stored as "1900-01-01 06:00:00 UTC" which has the numeric value 1.25.

This can be terribly misleading.

I am not sure if this issue is platform dependent, but readxl appears to have addressed the anomaly. It would be great if writexl was consistent with this.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0