Skip to content

Commit

Permalink
Fix for win_get_url module (Fixes #39151) - 2.5 backport (#39207)
Browse files Browse the repository at this point in the history
* Fix for win_get_url module (#39152)


(cherry picked from commit 0c96863)

* Added changelog fragment
  • Loading branch information
jborean93 committed Apr 24, 2018
1 parent 299861a commit 250d5b7
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
@@ -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)
2 changes: 1 addition & 1 deletion lib/ansible/modules/windows/win_get_url.ps1
Expand Up @@ -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
Expand Down

0 comments on commit 250d5b7

Please sign in to comment.