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 55using System ;
66using System . Collections . Generic ;
77using System . Collections . ObjectModel ;
8+ using System . Globalization ;
89using System . IO ;
910using System . Linq ;
1011using System . Text ;
@@ -30,6 +31,7 @@ public async Task<IEnumerable<DataGridDataItem>> GetDataAsync()
3031 StorageFile file = await StorageFile . GetFileFromApplicationUriAsync ( uri ) ;
3132 IRandomAccessStreamWithContentType randomStream = await file . OpenReadAsync ( ) ;
3233 _items = new ObservableCollection < DataGridDataItem > ( ) ;
34+ IFormatProvider provider = CultureInfo . InvariantCulture . DateTimeFormat ;
3335
3436 using ( StreamReader sr = new StreamReader ( randomStream . AsStreamForRead ( ) ) )
3537 {
@@ -48,7 +50,7 @@ public async Task<IEnumerable<DataGridDataItem>> GetDataAsync()
4850 Coordinates = values [ 4 ] ,
4951 Prominence = uint . Parse ( values [ 5 ] ) ,
5052 Parent_mountain = values [ 6 ] ,
51- First_ascent = DateTimeOffset . Parse ( values [ 7 ] ) ,
53+ First_ascent = DateTimeOffset . Parse ( values [ 7 ] , provider ) ,
5254 Ascents = values [ 8 ] ,
5355 } ) ;
5456 }
You can’t perform that action at this time.
0 commit comments