🦋 Welcome to the IRC channel of the core developers of the Raku Programming Language (raku.org #rakulang). This channel is logged for the purpose of history keeping about its development | evalbot usage: 'm: say 3;' or /msg camelia m: ... | Logs available at irclogs.raku.org/raku-dev/live.html | For MoarVM see #moarvm
Set by lizmat on 8 June 2022.
00:10 Guest72 left 08:05 finanalyst joined 09:18 finanalyst left 09:40 japhb left
tbrowder lizmat: i just looked at core.c/DateTime.rakumod and think a :longitude arg could be added fairly easily. any objections or known obstacles? 11:59
lizmat what would a ;longitude argument mean ? 12:03
ab5tract tbrowder: is that for looking up the TZ automatically? 12:21
Because it doesn’t really work exactly that way
lizmat unless it's meant to calculate solar time ?
ab5tract solar time? Like dawn/dusk? 12:30
lizmat no, the time it would be at a certain longitude by just looking at the sun, when the sun is South, it is supposed to be noon locally 12:40
e.g. about 100+ years ago, arrival times in the Dutch train timetable, would be in solar time... which was, well, confusing :) 12:41
e.g. noon in Amsterdam would be 30+ minutes later than noon in .e.g. Berlin 12:43
nine Which doesn't sound like something that really needs support in Raku core setting 12:48
ab5tract ah, ok, TIL 12:54
seems like you need at least latitude there too though
altitude would be relevant as well
lizmat why? when the sun is straight South, it is considered to be noon in solar time 12:55
altitude doesn't come into it ?
nor does latitude ? 12:56
ab5tract if you want accurate values for the postion of stellar objects, you need all three 13:04
the sun being one of those
you can't get an accurate sunrise or sunset without all three, 13:05
nine Solar time has nothing to do with sunrise or sunset. It's defined by when the sun is highest in the sky which is independent of latitude and altitude. 13:10
ab5tract It's abnout the position of the sun. Those are the starting and stopping positions of the sun for a given place on earth. Seems weird you can do anything realistic about intermediate positions without the same information 13:18
nine May seem weird, but nevertheless it's true. We are not talking about arbitrary intermediate positions here, but the zenith. That is a quite special one as it's exactly the same on a given longitude, regardless of the latitude. 13:22
ab5tract Ah, ok that does make sense. Thanks for setting me straight 13:27
13:27 vrurg left, vrurg joined 13:40 vrurg left 13:41 vrurg joined
tbrowder ok, i know it's a little weird for longitude to be in core, but a user has noticed that an unspecting user can be confused with julian-date's relation with UTC 0. the fix i believe is necessary to avoid that confusion (along with a suitable change to the docs). 13:57
nine What needs fixing in the first place and why is adding longitude a fix? 13:58
tbrowder the fact that getting the julian-date does not change with a timezone entry 13:59
and it shouldn't 14:00
docs are being fixed for current situation 14:02
nine That in no way explains :longitude 14:03
Just convert the given DateTime to UTC before converting that to Julian date. What else would you need? 14:04
tbrowder yes, that can be done, and the docs can fixed to explain it. 14:17
*be fixed 14:18
will continue to work on docs, thnx for yr help 14:24
lizmat or we can do the conversion to utc automatically 14:35
method modified-julian-date(DateTime:D: --> Real:D) { 14:36
-- self.daycount + self.day-fraction
++ .daycount + .day-fraction with self.utc
}
14:42 japhb joined
ab5tract that seems the most reasonable approach to me 14:48
nine Just keep in mind that the daycount can also change when converting from local to UTC 15:02
Which that patch would do correctly 15:03
15:06 vrurg left 15:07 vrurg joined 15:11 vrurg_ joined 15:13 vrurg left 15:21 vrurg_ left 15:22 japhb left 15:23 vrurg joined 15:57 finanalyst joined
ab5tract why Real:D ? wouldn't it be reasonable to keep as a Rat until someone wants to downgrade into floating point? 16:01
16:38 vrurg left 16:40 vrurg joined 21:48 japhb joined 21:53 japhb left 21:56 finanalyst left 22:04 japhb joined 22:48 japhb left 23:10 japhb joined 23:29 Guest72 joined 23:36 japhb left 23:38 Guest72 is now known as raydiak 23:43 raydiak is now known as Guest72