Fix compiler warnings
This commit is contained in:
@@ -43,14 +43,14 @@ template getError*(js: JsonNode): Error =
|
||||
if js.kind != JArray or js.len == 0: null
|
||||
else: Error(js[0]{"code"}.getInt)
|
||||
|
||||
template parseTime(time: string; f: static string; flen: int): Time =
|
||||
template parseTime(time: string; f: static string; flen: int): DateTime =
|
||||
if time.len != flen: return
|
||||
parse(time, f).toTime
|
||||
parse(time, f, utc())
|
||||
|
||||
proc getDateTime*(js: JsonNode): Time =
|
||||
proc getDateTime*(js: JsonNode): DateTime =
|
||||
parseTime(js.getStr, "yyyy-MM-dd\'T\'HH:mm:ss\'Z\'", 20)
|
||||
|
||||
proc getTime*(js: JsonNode): Time =
|
||||
proc getTime*(js: JsonNode): DateTime =
|
||||
parseTime(js.getStr, "ddd MMM dd hh:mm:ss \'+0000\' yyyy", 30)
|
||||
|
||||
proc getId*(id: string): string {.inline.} =
|
||||
|
||||
Reference in New Issue
Block a user