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 time issue #34

Closed
ronnievisser opened this issue Oct 12, 2016 · 8 comments
Closed

Date time issue #34

ronnievisser opened this issue Oct 12, 2016 · 8 comments

Comments

@ronnievisser
Copy link

Hi,

I have camt053 files from triodos bank that has an extra .999999 behind the dates in the files. If I'm correct this is some oracle format. The datetimeimmutable fails on this. Any ideas how to solve other then editing the file before parsing it?

Thnx

@frederikbosch
Copy link
Contributor

Maybe we can initialize a DateTimeImmutable using its createFromFormat sentence? Is PHP capable in initializing this date format at all?

@ronnievisser
Copy link
Author

ronnievisser commented Oct 13, 2016

It seems that it are microseconds. It also only the case in the Stmt.ToDtTm node.

I know that Carbon can handle it with the

Carbon::parse

method

I will take a look at the impact to implement it.

@ronnievisser
Copy link
Author

Seems that DateTimeImmutable can handle microseconds up to 6 digits. mine has 9.

@frederikbosch
Copy link
Contributor

@ronnievisser In that case something to this might work

DateTimeImmutable::createFromFormat('Y-m-d\TH:i:s.u\Z');

@frederikbosch
Copy link
Contributor

The u is for microseconds.

@frederikbosch
Copy link
Contributor

@ronnievisser Okay, that is a pity. Does that Triodos CAMT file has some kind of signature? Is it recognizable as a Triodos CAMT file? We might want to create abstractions per different camt file.

@ronnievisser
Copy link
Author

php can't handle nanoseconds only microseconds.. so I have to replace it in the file first before handling it.

There is no signature to recognize it a triodos I'm afraid. maybe the naming convention of the file but I'm not sure.

@frederikbosch
Copy link
Contributor

@ronnievisser Fixed in latest version, see #45 for details how to implement.

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