embulk / embulk/embulk-util-timestamp
[Discussion] TimestampParser strictly mode.
- Dominant language
- Java
- Stars
- 0
- Forks
- 0
- PR merge metrics
- No merged PRs in 30d
Description
For future discussion.
Current TimeStampParser allows parsing as timestamp the following data.
* format: `%Y-%m-%d %H:%M:%S`.
* input data: `2015-01-27 19:23:49 aaa`(`aaa is non-time data`)
Some users want to use TimestampParser strictly.
It is mean that a user wants to error when above data parsed.
## JRuby behavior
```ruby
[1] pry(main)> Date._strptime("2017/05/22 23:12:34","%Y/%m/%d %H:%M:%S")
=> {:year=>2017, :mon=>5, :mday=>22, :hour=>23, :min=>12, :sec=>34}
[2] pry(main)> Date._strptime("2017/05/22 23:12:34 hogehogehoge","%Y/%m/%d %H:%M:%S")
=> {:year=>2017,
:mon=>5,
:mday=>22,
:hour=>23,
:min=>12,
:sec=>34,
:leftover=>" hogehogehoge"}
```
## Ref(Written in Japanese)
* [gist](https://gist.github.com/hiroyuki-sato/10c4f31028f309864088d87fb92872e2)
* [twitter](https://twitter.com/you_s1025/status/866501633399676928)
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.