Fix for win_get_url module (Fixes #39151) - 2.5 backport (#39207)

* Fix for win_get_url module (#39152)


(cherry picked from commit 0c96863ec6)

* Added changelog fragment
pull/39230/head
Jordan Borean 8 years ago committed by GitHub
parent 299861a302
commit 250d5b74fa
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -0,0 +1,2 @@
bugfixes:
- win_get_url - Compare the UTC time of the web file to the local UTC time (https://github.com/ansible/ansible/pull/39152)

@ -71,7 +71,7 @@ Function CheckModified-File($url, $dest, $headers, $credentials, $timeout, $use_
$result.msg = $webResponse.StatusDescription
$webResponse.Close()
if ($webLastMod -and ((Get-Date -Date $webLastMod) -lt $fileLastMod)) {
if ($webLastMod -and ((Get-Date -Date $webLastMod).ToUniversalTime() -lt $fileLastMod)) {
return $false
} else {
return $true

Loading…
Cancel
Save