2019-03-16 GnuCash IRC logs

00:02:43 *** Agfarmer18 has joined #gnucash
00:11:22 *** Agfarmer18 has quit IRC
01:34:20 *** Grest has quit IRC
01:51:20 *** bertbob has quit IRC
01:53:40 *** bertbob has joined #gnucash
01:53:40 *** ChanServ sets mode: +v bertbob
02:22:50 *** galbarm has joined #gnucash
02:26:28 *** fell has quit IRC
02:27:47 *** fell has joined #gnucash
02:27:47 *** ChanServ sets mode: +o fell
02:35:21 *** galbarm has quit IRC
02:39:00 *** bertbob has quit IRC
02:41:08 *** bertbob has joined #gnucash
02:41:09 *** ChanServ sets mode: +v bertbob
02:50:55 *** Mechtilde has joined #gnucash
02:50:55 *** ChanServ sets mode: +v Mechtilde
02:58:11 *** Mechtilde has quit IRC
03:48:14 *** fabior has joined #gnucash
05:05:59 *** fabior has quit IRC
05:18:17 *** Mechtilde has joined #gnucash
05:18:17 *** ChanServ sets mode: +v Mechtilde
05:36:36 *** Mechtilde has quit IRC
05:37:23 *** Mechtilde has joined #gnucash
05:37:23 *** ChanServ sets mode: +v Mechtilde
05:47:47 *** dantob has joined #gnucash
06:19:49 *** O01eg has quit IRC
06:39:57 *** storyjesse has quit IRC
06:49:58 *** JayC has quit IRC
06:50:18 *** JayC has joined #gnucash
06:50:18 *** ChanServ sets mode: +v JayC
06:58:11 *** JayC has quit IRC
06:58:30 *** JayC has joined #gnucash
06:58:30 *** ChanServ sets mode: +v JayC
07:05:40 *** fabior has joined #gnucash
07:06:21 <chris> no matter what i do, I can't make average-balance.scm TZ-agnostic :(
07:27:38 *** User_ has joined #gnucash
07:27:39 *** Jimraehl1 has joined #gnucash
07:29:05 *** Jimraehl1 has left #gnucash
07:42:17 *** User_ has quit IRC
07:44:15 *** oozer has joined #gnucash
08:29:56 <warlord> chris, Interesting. What appears to be the TZ-based issue?
08:33:26 <chris> it's the average-balance calculator.
08:33:44 <chris> we know that split->posted-date is fine - stable across TZ
08:34:00 <chris> however report-start/end-date are usually absolute dates, set to be 0:00 somewhere
08:34:54 <chris> and the report-start/dates --> date intervals, and we want to calculate average-balance within each date-interval
08:35:11 <chris> this requires formula 'area under the line' described in https://bugs.gnucash.org/show_bug.cgi?id=748431
08:36:00 <chris> between splits it's fine, posted-dates have 24h increments
08:36:11 *** fabior has quit IRC
08:36:17 <chris> but between interval-start and split->posted-date the delta is TZ-dependent
08:36:22 *** jervin has joined #gnucash
08:36:53 <chris> tried many approaches and all fail to report stable average-balance when TZ=GMT+8 or TZ=GMT-8
08:36:58 * chris give sup
08:37:03 * chris gives up
08:45:06 *** Mechtilde has quit IRC
08:49:30 <warlord> why can't you convert the start/end dates to a stable day-of-epoch (instead of seconds-since epoch) and compare ? Isn't this exactly what the GncDate was supposed to do?
08:51:18 <warlord> Since the split->posted date has a stable TZ-safe representation, why can't you set the report interval in the same way, and compare it in a tz-safe way?
08:51:46 *** Mechtilde has joined #gnucash
08:51:46 *** ChanServ sets mode: +v Mechtilde
08:53:18 <chris> I don't really know GncDate... I know time64
08:55:14 <warlord> Right, time64 is a seconds-since-epoch calculation. GncDate is an object that is literally a d-m-y representation and lets you compare dates.
08:56:44 <chris> is gnc_mktime and gnc_localtime the conversion GncDate<->time64 ?
08:57:07 <warlord> I think so.
08:57:25 <warlord> One in local, one in UTC, IIRC.
08:59:18 *** Mechtilde has quit IRC
09:00:35 <warlord> anyways, I need to run for a bit. back later. have a great day
09:00:41 <chris> ttyl!
09:01:31 <chris> in anycase I've desecrated wingo's daily-reports.scm to remove analyze-splits
09:31:49 *** nimish2711 has joined #gnucash
09:32:52 *** chris has quit IRC
09:54:06 *** chris has joined #gnucash
09:54:06 *** ChanServ sets mode: +v chris
09:56:09 <chris> .
09:58:09 *** mdforbis has quit IRC
09:58:18 *** mdforbis has joined #gnucash
10:11:08 *** Mechtilde has joined #gnucash
10:11:08 *** ChanServ sets mode: +v Mechtilde
10:14:29 *** fabior has joined #gnucash
10:33:21 *** fabior has quit IRC
10:41:14 *** Mechtilde has quit IRC
11:02:13 *** boldstripe has joined #gnucash
11:04:01 *** Mechtilde has joined #gnucash
11:04:01 *** ChanServ sets mode: +v Mechtilde
11:07:31 *** chris has quit IRC
11:11:10 *** omnireq has quit IRC
11:12:52 *** omnireq has joined #gnucash
11:12:52 *** ChanServ sets mode: +v omnireq
11:28:51 *** chris has joined #gnucash
11:28:51 *** ChanServ sets mode: +v chris
11:29:11 *** fabior has joined #gnucash
11:38:31 *** gnomey has quit IRC
11:40:57 *** gnomey has joined #gnucash
11:59:39 *** Mechtilde has quit IRC
12:37:24 *** jralls has quit IRC
12:39:11 <warlord> chris, it's not desecration, it's improvement
12:43:26 *** jralls has joined #gnucash
12:43:27 *** ChanServ sets mode: +o jralls
12:46:27 *** jralls has quit IRC
12:46:28 *** jralls_ has joined #gnucash
13:24:45 *** gnomey has quit IRC
13:24:50 *** gnomey has joined #gnucash
14:00:17 *** oozer has quit IRC
14:42:25 *** Guest62 has joined #gnucash
14:56:44 *** oozer has joined #gnucash
15:02:31 *** User_ has joined #gnucash
15:10:04 *** User_ has quit IRC
15:16:31 *** nimish2711 has quit IRC
15:19:05 *** nimish2711 has joined #gnucash
15:23:43 *** frakturfreak has joined #gnucash
15:42:00 *** guak has joined #gnucash
15:53:57 *** trying2Simplify has joined #gnucash
15:57:05 *** trying2Simplify has quit IRC
15:59:40 *** trying2Simplify has joined #gnucash
16:01:45 *** kusmario has quit IRC
16:04:55 *** kusmario has joined #gnucash
16:04:56 *** ChanServ sets mode: +v kusmario
16:13:19 *** boldstripe has quit IRC
16:52:08 *** trying2Simplify has quit IRC
17:11:41 *** tonysoar has joined #gnucash
17:23:35 *** AnonCoder has joined #gnucash
17:30:05 *** tonysoar has quit IRC
17:35:46 *** AnonCoder has quit IRC
17:46:32 *** Mechtilde has joined #gnucash
17:46:32 *** ChanServ sets mode: +v Mechtilde
17:48:25 *** AnonCoder has joined #gnucash
17:52:24 *** Mechtilde has quit IRC
18:04:15 *** mdforbis has quit IRC
18:04:30 *** AnonCoder has quit IRC
18:18:00 *** User_ has joined #gnucash
18:22:34 *** User_ has quit IRC
18:25:15 *** jralls_ is now known as jralls
18:25:54 *** ChanServ sets mode: +o jralls
18:26:03 *** guak has quit IRC
18:26:37 <jralls> chris: No, gnc_mktime and gnc_localtime are emulations of the system calls mktime and localtime. They convert a struct tm to time64 and back respectively. A struct tm is a C struct with a collection of integer fields, the interesting ones being year, month, day-of-month, hour, minute, second, and a DST flag.
18:28:24 <jralls> chris: But you can use a struct tm to create a date. There's also a day-of-year value that you could use directly for your interval calculations.
18:29:29 <jralls> chris: Did you try (/ interval 86400) that I suggested yesterday?
18:29:36 <chris> yeah
18:30:05 <chris> something about GMT-8 and GMT+8 makes averages change
18:30:21 <chris> or, GMT-8 average = GMT average != GMT+8 average
18:32:03 <chris> tried all sorts of combos
18:33:13 <chris> perhaps the safest approach is to consider, e.g. monthly average, get balance-at-daily-dates, add them all, divide by number-of-days-in-month
18:35:20 <jralls> Umm, did you fix the example file so that the posted date was 10:59:00 UTC? If it's not then the day the transaction is in changes.
18:35:43 <chris> hm no i was trying my own data
18:37:43 <jralls> OK. What you just proposed is arithmetically equivalent to sum(balance[i] * interval-in-days[i])/total-days which is the analyze-splits algorithm with the seconds divided by 86400.
18:38:36 <chris> yeah similar but will remove the need to calculate time-difference between interval-start-date and split-date (I think)
18:39:24 <jralls> Yes, because you'll just iterate over the days and and do sum(balance[day])/days.
18:39:46 <chris> yeah will try that later
19:01:20 *** fabior has quit IRC
21:05:40 *** storyjesse has joined #gnucash
21:19:38 *** storyjesse has quit IRC
21:21:11 *** oozer has quit IRC
22:07:55 *** Guest62 has quit IRC
22:44:13 *** frakturfreak has quit IRC
23:57:05 *** bertbob has quit IRC
23:59:22 *** bertbob has joined #gnucash
23:59:23 *** ChanServ sets mode: +v bertbob
23:59:25 *** lmurph has joined #gnucash