diff --git a/src/time/gotime.nim b/src/time/gotime.nim index bf22a25..66fc107 100644 --- a/src/time/gotime.nim +++ b/src/time/gotime.nim @@ -10,7 +10,11 @@ proc parseTime*(inp: string): TimeInfo = if res == nil: raise newException(ValueError, "Invalid time passed to this thing") - return res[].fromSeconds.timeToTimeInfo + let + resdep = res[] + restime = resdep.fromSeconds + + return restime.timeToTimeInfo when isMainModule: let myTime = fixTime("2006-01-02T15:04:05.000000-07:00") diff --git a/src/time/time.go b/src/time/time.go index 6869f03..4df3a4c 100644 --- a/src/time/time.go +++ b/src/time/time.go @@ -1,8 +1,6 @@ package main -import ( - "time" -) +import "time" import "C" diff --git a/src/twtxt.nim b/src/twtxt.nim index 87ad532..a16fd35 100644 --- a/src/twtxt.nim +++ b/src/twtxt.nim @@ -74,5 +74,7 @@ proc updateTweetsOnce*() {. gcsafe .} = for tweet in tweets.items(): try: db.exec(sql"insert into tweets values(null, ?, ?, ?);", username, tweet.date.timeInfoToTime().toSeconds().int(), tweet.message) - except: discard - except: discard + except: + echo getCurrentExceptionMsg() + except: + echo getCurrentExceptionMsg()