-
Notifications
You must be signed in to change notification settings - Fork 436
str.to_datetime ignores '%z' #4220
Copy link
Copy link
Closed
Labels
bugSomething isn't workingSomething isn't workingnarwhalsFeatures/Bugs related to supporting narwhalsFeatures/Bugs related to supporting narwhalsp1Important to tackle soon, but preemptable by p0Important to tackle soon, but preemptable by p0
Description
Describe the bug
The code below outputs
╭───────────────────────────────╮
│ a │
│ --- │
│ Timestamp(Microseconds, None) │
╞═══════════════════════════════╡
│ 2020-01-01 00:00:00 │
╰───────────────────────────────╯
thus ignoring the '%z'
To Reproduce
import daft
df = daft.from_pydict({'a': ['2020-01-01T00:00:00+01:00']})
df.select(daft.col('a').str.to_datetime('%Y-%m-%dT%H:%M:%S%z')).collect()Expected behavior
probably
shape: (1, 1)
┌─────────────────────────┐
│ a │
│ --- │
│ datetime[μs, UTC] │
╞═════════════════════════╡
│ 2019-12-31 23:00:00 UTC │
└─────────────────────────┘
Component(s)
Native Runner
Additional context
spotted in narwhals
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't workingnarwhalsFeatures/Bugs related to supporting narwhalsFeatures/Bugs related to supporting narwhalsp1Important to tackle soon, but preemptable by p0Important to tackle soon, but preemptable by p0