whimsical-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From s...@apache.org
Subject [whimsy] branch master updated: Only date is used for token
Date Thu, 05 Jul 2018 17:02:04 GMT
This is an automated email from the ASF dual-hosted git repository.

sebb pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/whimsy.git


The following commit(s) were added to refs/heads/master by this push:
     new adaf725  Only date is used for token
adaf725 is described below

commit adaf72547c09b06edafc8a323c3ccccbec76dc4e
Author: Sebb <sebb@apache.org>
AuthorDate: Thu Jul 5 18:02:03 2018 +0100

    Only date is used for token
---
 www/project/icla/views/actions/discuss.json.rb | 5 +++--
 www/project/icla/views/actions/vote.json.rb    | 5 +++--
 2 files changed, 6 insertions(+), 4 deletions(-)

diff --git a/www/project/icla/views/actions/discuss.json.rb b/www/project/icla/views/actions/discuss.json.rb
index 9d9931a..0a0f766 100644
--- a/www/project/icla/views/actions/discuss.json.rb
+++ b/www/project/icla/views/actions/discuss.json.rb
@@ -27,10 +27,11 @@ rescue
   _focus :iclaemail
 end
 # create the discussion object
-date = Time.now.utc.to_s
+timestamp = Time.now.utc.to_s
+date = timestamp[0..9] # keep only the date 
 contributor = {:name => @iclaname, :email => @iclaemail}
 comment = @proposalText + "\n" + @discussComment
-comments = [{:member => @proposer, :timestamp => date, :comment => comment}]
+comments = [{:member => @proposer, :timestamp => timestamp, :comment => comment}]
 discussion = {
   :phase => 'discuss',
   :proposer => @proposer,
diff --git a/www/project/icla/views/actions/vote.json.rb b/www/project/icla/views/actions/vote.json.rb
index 123e67e..6729e6b 100644
--- a/www/project/icla/views/actions/vote.json.rb
+++ b/www/project/icla/views/actions/vote.json.rb
@@ -26,10 +26,11 @@ rescue
   _focus :iclaemail
 end
 # create the vote object
-date = Time.now.utc.to_s # need HMS in order to calculate accurate elapsed times
+timestamp = Time.now.utc.to_s # need HMS in order to calculate accurate elapsed times
+date = timestamp[0..9] # keep only the date 
 contributor = {:name => @iclaname, :email => @iclaemail}
 comment = @proposalText + "\n" + @voteComment
-votes = [{:vote =>'+1', :member => @proposer, :timestamp => date, :comment =>
comment}]
+votes = [{:vote =>'+1', :member => @proposer, :timestamp => timestamp, :comment
=> comment}]
 discussion = {
   :phase => 'vote',
   :proposer => @proposer,


Mime
View raw message