HydrologicEngineeringCenter / ExcelToCWMS

1 stars 2 forks source link

Pull request to incorporate timezones #24

Closed Tich1212 closed 3 years ago

Tich1212 commented 3 years ago

Why: Previously we assumed all data was in UTC. Users want the ability to enter TS data into excel in local time and view TS data read from the DB in local time.

Related to issue #17 Related to issue #23

How:

Tich1212 commented 3 years ago

More Learning:

Translating between Windows TimeZoneInfo and the java timezone (which is a required input for our oracle retrieve) is difficult.

TimeZoneInfo uses timezones on your Windows system, most of which are daylight savings aware. Using TimeZoneInfo would limit the user to utilize daylight savings timezones only.

Next Approach:

Instead we can use NodaTime, which allows us to create ZonedDateTimes using the java timezones (olson). We can specify whether the timezone is daylight aware or not.