Giter Club home page Giter Club logo

Comments (11)

verdammelt avatar verdammelt commented on September 25, 2024

If I've asked the might Oracle, Wolfram Alpha correctly it seems that it agrees with the test data:

http://www.wolframalpha.com/input/?i=what+is+one+billion+seconds+from+00%3A00%3A00+GMT+Jan+01+1900+

and

http://www.wolframalpha.com/input/?i=what+is+one+billion+seconds+from+12%3A30%3A30+GMT+July+19+1959

from common-lisp.

verdammelt avatar verdammelt commented on September 25, 2024

The tests seem to intend for everything to be in UTC. The example code does not specify time zone on either encode or decode so local timezone is used in both. BUT encode doesn't take DST into account but decode does. (ref: http://www.lispworks.com/documentation/HyperSpec/Body/f_encode.htm#encode-universal-time and http://www.lispworks.com/documentation/HyperSpec/Body/f_dec_un.htm#decode-universal-time respectively).

I hate dealing with time.

from common-lisp.

verdammelt avatar verdammelt commented on September 25, 2024

The reason that those two tests fail is because the example implementation is wrong. The example implementation does everything in "local timezone" not UTC as the tests seem to imply.

Of course when you do that then those tests pass but the other 3 fail. It seems those tests are wrong (again checking with Wolfram Alpha).

from common-lisp.

verdammelt avatar verdammelt commented on September 25, 2024

Made the pull request #40.

However I am assuming it must still be faulty about DST and it only working right now for EDT.

from common-lisp.

kytrinyx avatar kytrinyx commented on September 25, 2024

Should I close this or do you want to figure out DST?

from common-lisp.

verdammelt avatar verdammelt commented on September 25, 2024

Please do not close yet. I still worry about the DST (possible) issue.

from common-lisp.

verdammelt avatar verdammelt commented on September 25, 2024

@wobh how did you come up with the expected answers in the tests. I think that will be important for us to figure out if there are still problems.

from common-lisp.

wobh avatar wobh commented on September 25, 2024

Ugh. I don't remember. I looked it up in one place or another and did some math to verify my verification. It doesn't surprise me that I could have gotten it wrong on both sides of it. At one time I got all passing tests, though.

from common-lisp.

verdammelt avatar verdammelt commented on September 25, 2024

I don't doubt you had them all passing at one point. What do you think of my 'fix'. Do you think there is still a DST problem lurking? (I only debugged and fixed after our recent DST switch over so I am suspicious). But on the other hand the failure case after DST switchover was the same as reported before so maybe that means that DST is (for once) irrelevant?

from common-lisp.

wobh avatar wobh commented on September 25, 2024

Well, my brain is still pretty mucous bound and sleep depped. I'm astonished how fast this you turned this around. All I can say now is that the tests pass for me which was the metric I used originally. I'm comfortable with it until November 1.

from common-lisp.

verdammelt avatar verdammelt commented on September 25, 2024

Sorry to hear that you are en-colded. I am just getting over mine.

I am amused and bemused that I didn't look into this until you created an issue for it... I have been well trained by too many projects using JIRA - can't work on anything if there isn't a ticket for it :)

That being said - I'll close this.

@wobh hope you feel better soon.

from common-lisp.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.