File tree 1 file changed +4
-4
lines changed
1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change 41
41
from msc_pygeoapi .util import (
42
42
check_es_indexes_to_delete ,
43
43
configure_es_connection ,
44
+ DATETIME_RFC3339_FMT
44
45
)
45
46
46
47
60
61
SETTINGS = {
61
62
'order' : 0 ,
62
63
'version' : 1 ,
63
- 'index_patterns' : [INDEX_BASENAME ],
64
+ 'index_patterns' : [f' { INDEX_BASENAME } *' ],
64
65
'settings' : {
65
66
'number_of_shards' : 1 ,
66
67
'number_of_replicas' : 0
98
99
},
99
100
'DATETIME' : {
100
101
'type' : 'date' ,
101
- 'format' : 'strict_date_hour_minute_second ||strict_date_optional_time' # noqa
102
+ 'format' : 'date_time_no_millis ||strict_date_optional_time' # noqa
102
103
},
103
104
'DATETIME_LST' : {
104
105
'type' : 'date' ,
@@ -284,11 +285,10 @@ def generate_observations(self, filepath):
284
285
try :
285
286
# Convert timestamp to UTC time.
286
287
utc_datetime = delocalize_date (date_ )
287
- utc_datestamp = utc_datetime .strftime ('%Y-%m-%d.%H:%M:%S' )
288
+ utc_datestamp = utc_datetime .strftime (DATETIME_RFC3339_FMT )
288
289
# Generate an ID now that all fields are known.
289
290
observation_id = f'{ station } .{ utc_datestamp } '
290
291
291
- utc_datestamp = utc_datestamp .replace ('.' , 'T' )
292
292
except Exception as err :
293
293
LOGGER .error (f'Cannot interpret datetime value { date_ } in { filepath } ' # noqa
294
294
f' due to: { err } (skipping)' )
You can’t perform that action at this time.
0 commit comments