-
Notifications
You must be signed in to change notification settings - Fork 1
/
formats.py
78 lines (67 loc) · 1.8 KB
/
formats.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
searches = {
'osx-ls': [
{
'regex': r'(\d\d?\s(?:Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s+\d\d\:\d\d)',
'strptime': '%d %b %H:%M'
},
{
'regex': r'(\d\d?\s(?:Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s+\d{4})',
'strptime': '%d %b %Y'
}
],
'win-dir-uk': [
{
'regex': r'(\d{2}\/\d{2}\/\d{4}\s\s\d{2}\:\d{2})',
'strptime': '%d/%m/%Y %H:%M'
}
],
'uk': [
{
'regex': r'(\d{2}\/\d{2}\/\d{4}\s\d{1,2}\:\d{1,2}\:\d{1,2})',
'strptime': '%d/%m/%Y %H:%M:%S'
}
],
'win-dir-us': [
{
'regex': r'(\d{2}\/\d{2}\/\d{4}\s\s\d{2}\:\d{2})',
'strptime': '%m/%d/%Y %H:%M'
}
],
'web-golive': [
{
'regex': r'(\d{2}\/\d{2}\/\d{4}\s\d{2}\:\d{2}\s[AP]M\s\w+)',
'strptime': '%m/%d/%Y %H:%M %p %Z'
}
],
'cli-golive': [
{
'regex': r'(\d{2}\/\d{2}\/\d{4}\s\d{2}\:\d{2}:\d{2}\s[AP]M)',
'strptime': '%m/%d/%Y %H:%M:%S %p'
}
],
'us-hyphen': [
{
'regex': r'(\d{4}\-\d{2}\-\d{2}\s\d{2}\:\d{2}\:\d{2}\.\d*)',
'strptime': '%Y-%m-%d %H:%M:%S.%f'
}
],
'us-slash': [
{
'regex': r'(\d{2}\/\d{2}\/\d{4}\s\d{2}\:\d{2}\:\d{2})',
'strptime': '%m/%d/%Y %H:%M:%S'
}
],
'us-slash-no_secs': [
{
'regex': r'(\d{2}\/\d{2}\/\d{4}\s\d{2}\:\d{2})',
'strptime': '%m/%d/%Y %H:%M'
}
],
}
out_strftime = {
'epoch' : '%s',
'uk' : '%d/%m/%y %H:%M:%S',
'us' : '%m/%d/%y %H:%M:%S',
'year' : '%y-%m-%d %H:%M:%S',
'default' : '%Y/%m/%d %H:%M:%S',
}