diff --git a/hledger-lib/Hledger/Data/TimeLog.hs b/hledger-lib/Hledger/Data/TimeLog.hs index b1ff3954f..0cbbfa383 100644 --- a/hledger-lib/Hledger/Data/TimeLog.hs +++ b/hledger-lib/Hledger/Data/TimeLog.hs @@ -87,9 +87,7 @@ entryFromTimeLogInOut i o hrs = elapsedSeconds (toutc otime) (toutc itime) / 3600 where toutc = localTimeToUTC utc amount = Mixed [hours hrs] ps = [Posting{pstatus=False,paccount=acctname,pamount=amount, - pcomment="",ptype=RegularPosting,ptransaction=Just t} - --,Posting "assets:time" (-amount) "" RegularPosting - ] + pcomment="",ptype=VirtualPosting,ptransaction=Just t}] tests_TimeLog = TestList [ diff --git a/tests/timelog-stack-overflow.test b/tests/timelog-stack-overflow.test index e30892bfd..4b9cd49ca 100644 --- a/tests/timelog-stack-overflow.test +++ b/tests/timelog-stack-overflow.test @@ -6,8 +6,8 @@ i 2010/1/1 09:00:00 a:b o 2010/1/1 09:03:00 >>>=0 # incidentally this didn't trigger it.. go figure -bin/hledger -f - balance -<<< -i 2010/1/1 09:00:00 a:b -o 2010/1/1 09:02:00 ->>>=0 +#bin/hledger -f - balance +#<<< +#i 2010/1/1 09:00:00 a:b +#o 2010/1/1 09:02:00 +#>>>=0 diff --git a/tests/timelog.test b/tests/timelog.test index 9badea48d..218286fcd 100644 --- a/tests/timelog.test +++ b/tests/timelog.test @@ -1,10 +1,11 @@ +# a timelog session is parsed as a similarly-named transaction with one virtual posting bin/hledger -f - print <<< -i 2009/1/1 08:00:00 x +i 2009/1/1 08:00:00 something o 2009/1/1 09:00:00 >>> 2009/01/01 * 08:00-09:00 - x 1.0h + (something) 1.0h >>>2