[Pkg-privacy-commits] [torbirdy] 49/53: Bug 6314: Ensure Date header uses UTC string

Ulrike Uhlig u-guest at moszumanska.debian.org
Sat Jul 2 20:08:08 UTC 2016


This is an automated email from the git hooks/post-receive script.

u-guest pushed a commit to annotated tag 0.2.0
in repository torbirdy.

commit 230ba97882424d35e12794c45db7c6715fe753f9
Author: Arthur Edelstein <arthuredelstein at gmail.com>
Date:   Thu Jun 16 16:49:58 2016 -0700

    Bug 6314: Ensure Date header uses UTC string
---
 components/torbirdy.js | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/components/torbirdy.js b/components/torbirdy.js
index 84ea9c7..d4743e0 100644
--- a/components/torbirdy.js
+++ b/components/torbirdy.js
@@ -392,9 +392,11 @@ function sanitizeDateHeaders() {
     let roundedDate = new Date(date.getTime());
     // Round down to the nearest minute.
     roundedDate.setSeconds(0);
-    // Use the headeremitter's addDate function to format it properly.
-    // `this` magically refers to the headeremitter object.
-    this.addDate(roundedDate);
+    // Use the headeremitter's internal `addText` function to inject the
+    // Date header. `this` magically refers to the headeremitter object.
+    // Date.toUTCString() produces an RFC 1123-formatted date string.
+    // We replace the "GMT" symbol with "+0000" because it is preferred.
+    this.addText(roundedDate.toUTCString().replace(/GMT$/, "+0000"), false);
   });
 }
 

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-privacy/packages/torbirdy.git



More information about the Pkg-privacy-commits mailing list