Browse Source

Fix parsing datetime with OS culture

master
Figg 1 month 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,8 +28,8 @@ function Get-APFileDateTaken {
28 28
         $PropIndex
29 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 33
     return $DateTaken
34 34
 }
35 35
 

Loading…
Cancel
Save