d3-celestial icon indicating copy to clipboard operation
d3-celestial copied to clipboard

daylight savings time transitions are messing with the orientation and rotation

Open oudeicrat opened this issue 3 years ago • 4 comments

in an example where you can set the time, for example https://ofrohn.github.io/celestial-demo/location.html set the time to 1 second before DST transition, then add one second and observe the sky rotate far more than 1 second. For example in my area that would be from 2020-10-25 02:59:59 +0200 to 2020-10-25 03:00:00 +0200

Is there a way of setting the sky time independent of DST (for example in UTC) so that the sky doesn't jump suddenly?

oudeicrat avatar Aug 20 '20 09:08 oudeicrat

The observed behavior is as expected, since the time shifts by +1 or -1 hour at transition and the zenith therefore jumps 15 degrees. If you want to switch off automatic DST setting, the configuration parameter settimezone: false is for you

ofrohn avatar Aug 20 '20 18:08 ofrohn

thanks, but it didn't help, it seems that setPosition() isn't even called

oudeicrat avatar Aug 25 '20 07:08 oudeicrat

That's the way it is supposed to work, when you switch off timezone setting you have to do it entirely manually. You can use e.g. Celestial.skyview() to set any datetime, geoposition and timezone. At least that's how it's implemented now. How would you like it to work?

ofrohn avatar Aug 26 '20 09:08 ofrohn

I'm trying to create an animation of the stars moving across the sky above the whole earth, so I'm incrementing the datetime and calling skyview with the date. Since it's a view of the whole sky above the whole earth, I want it to be independent of geoposition, timezones and DST, so I'm using UTC methods for the js Date object and display the time in UTC

oudeicrat avatar Aug 26 '20 14:08 oudeicrat