Giter Site home page Giter Site logo

adonmo / daylight Goto Github PK

View Code? Open in Web Editor NEW
14.0 2.0 3.0 794 KB

The answer to your daylight related questions

Home Page: https://adonmo-daylight.readthedocs.io/en/latest/

License: MIT License

CMake 43.52% C++ 48.74% Python 6.72% C 1.02%
irradiance sunrise sunset cpp python

daylight's People

Contributors

chaitan94 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

daylight's Issues

time_from_decimal_day mktime

I'm not sure if this is working as expected:

  struct std::tm epoch = {0};
  epoch.tm_isdst = 0;
  epoch.tm_sec = epoch.tm_min = epoch.tm_hour = epoch.tm_mon = 0;
  epoch.tm_mday = 1;
  epoch.tm_year = 70;
  time_t local_tz_offset = mktime(&epoch);
...
  return mktime(&t) - local_tz_offset;

I'm getting local_tz_offset -3600 on my computer.

but the thing is that mktime looks is not following the timezone offsets.
In fact, what was correct to me, was to not use this local_tz_offset adjust.
Now because of the - (-3600) it gives me +1hour

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.