* Martin Blais <bl...@furius.ca> [2018-04-10 22:07]:
> Any thoughts welcome. I lean toward (B), but I'm annoyed.
Maybe I misunderstand the problem, but with option (A) even if I don't
know what timezone they use, I should get a consistent result if I ask
the API for an exchange rate for a specific time (X) on a specific
day.
Maybe I don't know what timezone X is (as you say, only one
publishes that info), but X is always going to be X from the POV of
the source (i.e. the API). (Similarly, if I in Europe ask the API for
a rate at, let's say, 14:00, and you in New York ask for the rate at
14:00, we should get the same result.
And I don't mean asking at
14:00 hours but asking for the rate at 14:00)
If I understand (B) correctly, someone moving from Japan to the US
would suddenly get different results,
and I think making the result
dependent on where you are is a bad idea.
--
Martin Michlmayr
http://www.cyrius.com/
--
You received this message because you are subscribed to the Google Groups "Beancount" group.
To unsubscribe from this group and stop receiving emails from it, send an email to beancount+unsubscribe@googlegroups.com.
To post to this group, send email to bean...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/beancount/20180411192331.nnbpxcox6jepe3ro%40jirafa.cyrius.com.
For more options, visit https://groups.google.com/d/optout.
If I run bean-price when the market is open I'm going to get a quasi-real time quote that is delayed an arbitrary and possibly unknown amount of time anyway. It won't **really** be the price at 12:07pm. (This will vary depending on the source and the price fetcher, of course.)
Just using the user's timezone seems to make the most since to me. But what happens with downloaded prices when the user moves to a different timezone? Or is the timezone going to be stored with the fetched price?
Or is the timezone going to be stored with the fetched price?
--
You received this message because you are subscribed to the Google Groups "Beancount" group.
To unsubscribe from this group and stop receiving emails from it, send an email to beancount+unsubscribe@googlegroups.com.
To post to this group, send email to bean...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/beancount/c6450704-b02f-4698-9b5f-b0dc8d699f75%40googlegroups.com.
* Martin Blais <bl...@furius.ca> [2018-04-11 16:29]:
> You ask at 14:00 in which timezone? US 14:00 or Europe 14:00?
> If you don't know the instrument trades in the US, you ask at 14:00 in
> Europe timezone?
Sorry, I thought you told the API "I want the exchange rate at 14:00
time". If so, we'd all get the same answer regardless of our local
timezone. It would be nice to know what the APIs timezone is so we
know what "14:00" really means but that doesn't matter for beancount.
If you only tell the API "I want the exchange rate now", then I think
beancount should store the time in UTC.
> Our current API doesn't support you providing a time, just a date.
> You request for a price at a particular date.
Ok, (I think) I see the problem.
If the API queried by beancount only provides 1 rate per day, we could
easily find out what a "day" is according to them by doing a query
every hour for 24 hours.
Or just pick mid-day UTC.
--
Martin Michlmayr
http://www.cyrius.com/
--
You received this message because you are subscribed to the Google Groups "Beancount" group.
To unsubscribe from this group and stop receiving emails from it, send an email to beancount+unsubscribe@googlegroups.com.
To post to this group, send email to bean...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/beancount/20180415165103.zaixqwtthtn35fuu%40jirafa.cyrius.com.
--
You received this message because you are subscribed to the Google Groups "Beancount" group.
To unsubscribe from this group and stop receiving emails from it, send an email to beancount+unsubscribe@googlegroups.com.
To post to this group, send email to bean...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/beancount/20180415165103.zaixqwtthtn35fuu%40jirafa.cyrius.com.