mirror of
https://github.com/echemdata/galvani.git
synced 2025-12-14 01:15:34 +00:00
Also try parsing dates as '%m-%d-%y' - fixes #20
This commit is contained in:
@@ -360,12 +360,18 @@ class MPRfile:
|
||||
self.cols = column_types
|
||||
self.npts = n_data_points
|
||||
|
||||
tm = time.strptime(str3(settings_mod['date']), '%m/%d/%y')
|
||||
try:
|
||||
tm = time.strptime(str3(settings_mod['date']), '%m/%d/%y')
|
||||
except ValueError:
|
||||
tm = time.strptime(str3(settings_mod['date']), '%m-%d-%y')
|
||||
self.startdate = date(tm.tm_year, tm.tm_mon, tm.tm_mday)
|
||||
|
||||
if maybe_log_module:
|
||||
log_module, = maybe_log_module
|
||||
tm = time.strptime(str3(log_module['date']), '%m/%d/%y')
|
||||
try:
|
||||
tm = time.strptime(str3(log_module['date']), '%m/%d/%y')
|
||||
except ValueError:
|
||||
tm = time.strptime(str3(log_module['date']), '%m-%d-%y')
|
||||
self.enddate = date(tm.tm_year, tm.tm_mon, tm.tm_mday)
|
||||
|
||||
## There is a timestamp at either 465 or 469 bytes
|
||||
|
||||
Reference in New Issue
Block a user