mirror of
https://github.com/Gnucash/gnucash.git
synced 2025-02-25 18:55:30 -06:00
Fixes for new 64-bit time setter/getters
This commit is contained in:
@@ -38,7 +38,7 @@ value = latest.get_value()
|
||||
pl = pdb.get_prices(arm,gbp)
|
||||
for pr in pl:
|
||||
source = pr.get_source()
|
||||
time = pr.get_time()
|
||||
time = pr.get_time64()
|
||||
v=pr.get_value()
|
||||
price = float(v.num)/v.denom
|
||||
print(time, source, price)
|
||||
|
||||
@@ -79,7 +79,7 @@ for namespace in namespaces:
|
||||
for pr in pl:
|
||||
|
||||
source = pr.get_source()
|
||||
time = pr.get_time()
|
||||
time = pr.get_time64()
|
||||
v=pr.get_value()
|
||||
price = float(v.num)/v.denom
|
||||
|
||||
|
||||
@@ -78,7 +78,7 @@ for i in range(0,len(stock_date)):
|
||||
p_new = pl0.clone(book)
|
||||
p_new = gnucash.GncPrice(instance=p_new)
|
||||
print('Adding',i,stock_date[i],stock_price[i])
|
||||
p_new.set_time(stock_date[i])
|
||||
p_new.set_time64(stock_date[i])
|
||||
v = p_new.get_value()
|
||||
v.num = int(Fraction.from_float(stock_price[i]).limit_denominator(100000).numerator)
|
||||
v.denom = int(Fraction.from_float(stock_price[i]).limit_denominator(100000).denominator)
|
||||
|
||||
Reference in New Issue
Block a user