udivankin / sunrise-sunset

Sunrise and sunset time calculation for given coordinates. ~1kb minified with zero dependencies.
74 stars 17 forks source link

Fix Time Zone Bug, Tests and Typos #5

Closed MiWeiss closed 5 years ago

MiWeiss commented 5 years ago

Content:

  1. Previously, the result of getSunset and getSunrise would be a Date object in the local (system) time zone, but the time represented would be the UTC time (issue #2 and #4)
  2. Fixed two typos, similar to #3
  3. Made sure tests could run anywhere and any system. Previously, they would only pass on systems with the correct time zone.
  4. Previously, the date of the output could be different from the input date, due to time zone conversion. This is now fixed.