You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@trafficcontrol.apache.org by sr...@apache.org on 2022/03/10 15:54:38 UTC
[trafficcontrol] branch master updated: update mmdb 304 date check (#6631)
This is an automated email from the ASF dual-hosted git repository.
srijeet0406 pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/trafficcontrol.git
The following commit(s) were added to refs/heads/master by this push:
new b535f91 update mmdb 304 date check (#6631)
b535f91 is described below
commit b535f91d907ca3c880a5ccc36b2623d87cb50e0a
Author: Evan Zelkowitz <ev...@comcast.com>
AuthorDate: Thu Mar 10 08:53:36 2022 -0700
update mmdb 304 date check (#6631)
The current date format is incorrect for issuing an IMS against the maxmind db
Currently it outputs in a format like:
`Wed, 09 Mar 2022 11:12:53 PM UTC`.
Which is incorrect due to the PM (it should also be GMT but most servers seem to interchange UTC and GMT fine for IMS requests)
The date string needs to swap %r, which is the local 12hr clock, with %T which is 24-hr:M:S
---
cache-config/t3c-apply/util/util.go | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/cache-config/t3c-apply/util/util.go b/cache-config/t3c-apply/util/util.go
index 6dc357b..f050547 100644
--- a/cache-config/t3c-apply/util/util.go
+++ b/cache-config/t3c-apply/util/util.go
@@ -476,7 +476,7 @@ func UpdateMaxmind(cfg config.Cfg) bool {
// Check if filename exists in ats etc
filePath := filepath.Join(cfg.TsConfigDir, "/", fileName)
stdOut, _, code := t3cutil.Do(`date`,
- "+%a, %d %b %Y %r %Z",
+ "+%a, %d %b %Y %T %Z",
"-u",
"-r",
filePath)