petlof / liveresults

EmmaClient is a client-server system for publishing liveresults from Orienteering events. It have been used on many major events such as JWOC, WOC, EOC,..
http://liveresultat.orientering.se
GNU Lesser General Public License v3.0
40 stars 24 forks source link

Fix retrieval of starttime and splittimes for non-internet date formats #30

Closed fredricj closed 6 years ago

fredricj commented 6 years ago

When system date format is not in Internet date format (YYYY-MM-DD), parsing of datetimes failed. For datetime columns the .NET framework's database interfaces already creates DateTime object and .ToString() returns datetimes in system format which ParseDateTime() didnt account for. Skip ParseDateTime() and retrieve the DateTime objects directly

Fixes bug #28

fredricj commented 6 years ago

I have only tested this against the MySQL database and not the h2 database backend

petlof commented 6 years ago

H2 backend does not return a DateTime object (more something like java.lang.dateTime i think), therefore it's needed to somehow convert to a .NET DateTime object

fredricj commented 6 years ago

Hm, okay. I also notice now that h2sharp is not implementing the full interface and does some things differently, among others: