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

Breaks microseconds after call tidy_repair_string #771

Closed
alexeygon opened this issue Nov 8, 2018 · 2 comments
Closed

Breaks microseconds after call tidy_repair_string #771

alexeygon opened this issue Nov 8, 2018 · 2 comments

Comments

@alexeygon
Copy link

Problem: after call tidy_repair_string function, there is no microseconds in DateTime.
Code to reproduce:

$dateTime = new \DateTime('2014-04-11T22:20:45.571Z');
$microseconds = $dateTime->format('u');
echo $microseconds . PHP_EOL;

tidy_repair_string('some string...');

$dateTime = new \DateTime('2014-04-11T22:20:45.571Z');
$microseconds = $dateTime->format('u');
echo $microseconds . PHP_EOL;

Actual:

571000
000000

Expected:

571000
571000

Versions:

PHP Version => 7.1.23-4+ubuntu18.04.1+deb.sury.org+1
tidy

Tidy support => enabled
libTidy Version => 5.6.0
libTidy Release => 2017/11/25
Extension Version => 7.1.23-4+ubuntu18.04.1+deb.sury.org+1 ($Id: c6d6b80d55c5d351deaa745c3c540971e5583c24 $)

Directive => Local Value => Master Value
tidy.clean_output => no value => no value
tidy.default_config => no value => no value
@geoffmcl
Copy link
Contributor

@alexeygon thanks for the issue...

But at this moment this looks more like a PHP implementation problem, rather than anything to do with libtidy...

Yes, the tidy_repair_string('some string...'); code will run libtidy...

But how can this effect the PHP DateTime function?

Maybe with more information, feedback, comments,... this will become clear... thanks...

@balthisar
Copy link
Member

PHP issue, so closing.

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

3 participants