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

test for Time::fromString does not pass #109

Open
doudou opened this issue Jun 29, 2017 · 3 comments
Open

test for Time::fromString does not pass #109

doudou opened this issue Jun 29, 2017 · 3 comments

Comments

@doudou
Copy link
Member

doudou commented Jun 29, 2017

When running the tests for base::Time::fromString, I get the following error:

test.cpp(426): fatal error in "time_fromString": critical check formatNow.toMicroseconds() == 1339668306001001 failed [1339686306001001 != 1339668306001001]

It looks like a misplaced 8 (686 vs 668), but I really am not sure what the right value should be. Does it run for you @2maz ?

@2maz
Copy link
Member

2maz commented Jun 30, 2017

Test runs fine on Ubuntu 14.04 and the expected value should be correct (checked also with https://currentmillis.com/). What platform are you running the test on?

@doudou
Copy link
Member Author

doudou commented Jun 30, 2017

What platform are you running the test on?

16:04. I would guess it's a time zone issue (BRT vs CET)

@2maz
Copy link
Member

2maz commented Jun 30, 2017

Yap, that is probably it: looks like timezone handling is not fully implemented through strptime

https://www.gnu.org/software/libc/manual/html_node/Low_002dLevel-Time-String-Parsing.html

%Z

    The timezone name.

    Note: Currently, this is not fully implemented. The format is recognized, input is consumed but no field in tm is set.

@2maz 2maz closed this as completed Jun 30, 2017
@2maz 2maz reopened this Jun 30, 2017
@2maz 2maz mentioned this issue Dec 12, 2019
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