Browse Source

Fix parsing datetime with OS culture

master
Figg 4 months ago
parent
commit
45e9183e10
1 changed files with 2 additions and 2 deletions
  1. 2
    2
      ArrangePictures.ps1

+ 2
- 2
ArrangePictures.ps1 View File

28
         $PropIndex
28
         $PropIndex
29
     ) -replace $CharWhiteList
29
     ) -replace $CharWhiteList
30
 
30
 
31
-    
32
-    $DateTaken = try { [DateTime]($DateTaken) } catch { $null }
31
+    $culture = Get-Culture
32
+    $DateTaken = try { [DateTime]::Parse($DateTaken, $culture) } catch { $null }
33
     return $DateTaken
33
     return $DateTaken
34
 }
34
 }
35
 
35
 

Loading…
Cancel
Save