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

Configurable date format #249

Open
kirill533 opened this issue May 7, 2020 · 3 comments
Open

Configurable date format #249

kirill533 opened this issue May 7, 2020 · 3 comments
Assignees

Comments

@kirill533
Copy link
Contributor

OData clients/servers deliver date differently. For example, https://services.odata.org/OData/OData.svc/Products
deivers field "updated" like this:
<updated>2020-05-07T12:41:26Z</updated> .

In case of Power BI, it works if the format of the date will be done the following way:

JsonWriter::writeValue

                $dateTime = new \DateTime($value, new \DateTimeZone('UTC'));
                $formattedDateTime = $dateTime->format('Y-m-d\TH:i:s');
                $this->writeCore($formattedDateTime, /* quotes */ true);

Current implementation in master is:

                $dateTime          = new \DateTime($value, new \DateTimeZone('UTC'));
                $formattedDateTime = $dateTime->format('U')*1000;
                $this->writeCore('/Date(' . $formattedDateTime . ')/', /* quotes */ true);

Could you please make it configurable?

@kirill533
Copy link
Contributor Author

Sure, I was also thinking about that new configurator. This is not a high prio item, just a small item to come closer to the merge of our repos.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants
@kirill533 and others