File tree Expand file tree Collapse file tree 1 file changed +3
-1
lines changed
Microsoft.Toolkit.Uwp.SampleApp/Data Expand file tree Collapse file tree 1 file changed +3
-1
lines changed Original file line number Diff line number Diff line change 5
5
using System ;
6
6
using System . Collections . Generic ;
7
7
using System . Collections . ObjectModel ;
8
+ using System . Globalization ;
8
9
using System . IO ;
9
10
using System . Linq ;
10
11
using System . Text ;
@@ -30,6 +31,7 @@ public async Task<IEnumerable<DataGridDataItem>> GetDataAsync()
30
31
StorageFile file = await StorageFile . GetFileFromApplicationUriAsync ( uri ) ;
31
32
IRandomAccessStreamWithContentType randomStream = await file . OpenReadAsync ( ) ;
32
33
_items = new ObservableCollection < DataGridDataItem > ( ) ;
34
+ IFormatProvider provider = CultureInfo . InvariantCulture . DateTimeFormat ;
33
35
34
36
using ( StreamReader sr = new StreamReader ( randomStream . AsStreamForRead ( ) ) )
35
37
{
@@ -48,7 +50,7 @@ public async Task<IEnumerable<DataGridDataItem>> GetDataAsync()
48
50
Coordinates = values [ 4 ] ,
49
51
Prominence = uint . Parse ( values [ 5 ] ) ,
50
52
Parent_mountain = values [ 6 ] ,
51
- First_ascent = DateTimeOffset . Parse ( values [ 7 ] ) ,
53
+ First_ascent = DateTimeOffset . Parse ( values [ 7 ] , provider ) ,
52
54
Ascents = values [ 8 ] ,
53
55
} ) ;
54
56
}
You can’t perform that action at this time.
0 commit comments