HydrologicEngineeringCenter / ExcelToCWMS

1 stars 2 forks source link

Allow user to set the time zone of the excel data #17

Closed Tich1212 closed 3 years ago

Tich1212 commented 3 years ago

We are currently assuming the data from excel is in UTC.

Instead allow the user to specify that either in the db.config or the excel sheet itself.

Note:

ktarbet commented 3 years ago

All all time-series in the same time zone? Perhaps the config file should have time zone as a first/high level default.

Tich1212 commented 3 years ago

Karl's comment from dup ticket:

"code in https://github.com/HydrologicEngineeringCenter/ExcelToCWMS/blob/main/Hec.Cwms/CwmsDatabase.cs

is hardcoded to 'UTC' in this statement


      cmd.CommandText =
     "begin " +
     "  cwms_ts.retrieve_ts( " +
     "    :ts_cur, " +
     "    :tsid, " +
     "    :units, " +
     "    to_date(:start_time, 'dd-mon-yyyy hh24mi'), " +
     "    to_date(:end_time,   'dd-mon-yyyy hh24mi'), " +
     "    'UTC');" +
     "end;";

Should the time zone be an optional in the excel header: ie. tsid.daily....{units=cfs, time-zone=cst} ?"

Tich1212 commented 3 years ago

Pull request #24 addressed this issue with setting the time zone in the config file.