Commit adcf6a1
committed
Introduced new
When we introduced the `GetDateTime()` extension method in #dde0ade, we inadvertantly reduced the precision of the `DateTime` value returned. This is a problem since this is used for `Version` (e.g., when setting the `VersionHistory`) and that's a place where the precision must match the database exactly. Unfortunately, the logic for this is a bit different than it is for other types, since it's the interstitial string conversion that's introducing the problem here. To mitigate that, we must duplicate some of the logic from the private `GetValue<T>()` in order to explicitly avoid that conversion, and instead pull the value explicitly using the `GetDateTime()` method. This process won't actually work with other types of `DateTime` values, such as those encoded as a string in the `Attributes` table. As such, to differentiate these, this is being introduced as `GetVersion()`.GetVersion() extension1 parent 47ef38d commit adcf6a1
2 files changed
Lines changed: 13 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
58 | 58 | | |
59 | 59 | | |
60 | 60 | | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
61 | 71 | | |
62 | 72 | | |
63 | 73 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
118 | 118 | | |
119 | 119 | | |
120 | 120 | | |
121 | | - | |
| 121 | + | |
122 | 122 | | |
123 | 123 | | |
124 | 124 | | |
| |||
173 | 173 | | |
174 | 174 | | |
175 | 175 | | |
176 | | - | |
| 176 | + | |
177 | 177 | | |
178 | 178 | | |
179 | 179 | | |
| |||
331 | 331 | | |
332 | 332 | | |
333 | 333 | | |
334 | | - | |
| 334 | + | |
335 | 335 | | |
336 | 336 | | |
337 | 337 | | |
| |||
0 commit comments