Comments (11)
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.
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.
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.
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.
Should I close this or do you want to figure out DST?
from common-lisp.
Please do not close yet. I still worry about the DST (possible) issue.
from common-lisp.
@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.
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.
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.
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.
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)
- Out of sync practice exercises HOT 1
- Out of sync practice exercises HOT 1
- Using `roswell` to run tests. HOT 10
- Building a training set of tags for common-lisp HOT 20
- Typo in robot-simulator test. HOT 2
- Deprecate `beer-song` in favor of `bottle-song` HOT 3
- Out of sync practice exercises
- Out of sync practice exercises
- Implement `leap`? HOT 5
- Out of sync practice exercises HOT 1
- Out of sync practice exercises
- key-comparison maze of arrays unclear test of identity or internal structure HOT 3
- Out of sync practice exercises
- Out of sync practice exercises
- Out of sync practice exercises HOT 1
- Out of sync practice exercises HOT 1
- Out of sync practice exercises
- Confusing hint in Larry's Winning Checker
- Concept reducing typo element rather than sequence HOT 2
- Out of sync practice exercises
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from common-lisp.