Giter VIP home page Giter VIP logo

Comments (3)

tschellenbach avatar tschellenbach commented on May 19, 2024

Whow, good spot!

That's one we clearly didnt see coming :)

On Thu, Mar 20, 2014 at 7:16 PM, lucianolev [email protected]:

Hi,
Suddenly my test where almost all failing in a strange way and after a lot
of debugging I think a discovered a bug regarding serialization and
deserialization of activities. The problem is that datetime_to_epoch is not
the inverse of epoch_to_datetime for ALL dates. Check this out:

datetime_to_epoch(datetime(2014, 3, 20, 11, 43, 20, 0)) returns
1395337400
epoch_to_datetime(float(1395337400)) return 2014-03-20 12:43:20

After trying a some cases by hand, the problem seems to appear after 9
March 2014:

epoch_to_datetime(float(datetime_to_epoch(datetime(2014, 3, 8, 11, 43, 20,
0)))) returns 2014-03-08 11:43:20
epoch_to_datetime(float(datetime_to_epoch(datetime(2014, 3, 9, 11, 43, 20,
0)))) returns 2014-03-08 12:43:20

Probably this behaviour is related to daylight saving.

Reply to this email directly or view it on GitHubhttps://github.com//issues/51
.

from stream-framework.

tbarbugli avatar tbarbugli commented on May 19, 2024

Hi,
thank you for reporting this!
While this problem only affects test behaviour; (activity.Activity
initialisation uses datetime.datetime.utcnow) nothing stops one from
initialising activities using localised datetimes.
There is not much we can do about that other than add clear documentation
and suggest against store anything else than utc datetime. (and fix the
tests :))

Tommaso

2014-03-20 19:37 GMT+01:00 Thierry Schellenbach [email protected]:

Whow, good spot!

That's one we clearly didnt see coming :)

On Thu, Mar 20, 2014 at 7:16 PM, lucianolev <[email protected]

wrote:

Hi,
Suddenly my test where almost all failing in a strange way and after a
lot
of debugging I think a discovered a bug regarding serialization and
deserialization of activities. The problem is that datetime_to_epoch is
not
the inverse of epoch_to_datetime for ALL dates. Check this out:

datetime_to_epoch(datetime(2014, 3, 20, 11, 43, 20, 0)) returns
1395337400
epoch_to_datetime(float(1395337400)) return 2014-03-20 12:43:20

After trying a some cases by hand, the problem seems to appear after 9
March 2014:

epoch_to_datetime(float(datetime_to_epoch(datetime(2014, 3, 8, 11, 43,
20,
0)))) returns 2014-03-08 11:43:20
epoch_to_datetime(float(datetime_to_epoch(datetime(2014, 3, 9, 11, 43,
20,
0)))) returns 2014-03-08 12:43:20

Probably this behaviour is related to daylight saving.

Reply to this email directly or view it on GitHub<
https://github.com/tschellenbach/Feedly/issues/51>

.

Reply to this email directly or view it on GitHubhttps://github.com//issues/51#issuecomment-38204941
.

from stream-framework.

lucianolev avatar lucianolev commented on May 19, 2024

Hi, I was using Feedly 0.9.32 and it was using datetime.datetime.today on init instead of datetime.datetime.utcnow, but after updating to 0.9.42 now all my tests are passing :)
I wasn't aware that feedly tests were failing heh, my test were. Better fix that and also put a warning in the docs. :)

Thanks for the feedback and I'm glad that I could help.

from stream-framework.

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.