9 curr_event[k] = v; |
9 curr_event[k] = v; |
10 end |
10 end |
11 |
11 |
12 if k == "DTSTAMP" then |
12 if k == "DTSTAMP" then |
13 local t = {}; |
13 local t = {}; |
14 t.year, t.month, t.day, t.hour, t.min, t.sec = v:match("^(%d%d%d%d)(%d%d)(%d%d)T(%d%d)(%d%d)(%d%d)Z$"); |
14 t.year, t.month, t.day = v:match("^(%d%d%d%d)(%d%d)(%d%d)"); |
|
15 t.hour, t.min, t.sec = v:match("T(%d%d)(%d%d)(%d%d)Z$"); |
15 for k,v in pairs(t) do t[k] = tonumber(v); end |
16 for k,v in pairs(t) do t[k] = tonumber(v); end |
16 curr_event.when = os.time(t); |
17 curr_event.when = os.time(t); |
17 end |
18 end |
18 end |
19 end |
19 |
20 |