whimsical-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ru...@apache.org
Subject [whimsy] branch master updated: switch to active_support/core_ext/time
Date Thu, 17 Oct 2019 01:10:00 GMT
This is an automated email from the ASF dual-hosted git repository.

rubys 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 14f1f8d  switch to active_support/core_ext/time
14f1f8d is described below

commit 14f1f8d0883739235298f769edbade049f87ade1
Author: Sam Ruby <rubys@intertwingly.net>
AuthorDate: Wed Oct 16 21:09:47 2019 -0400

    switch to active_support/core_ext/time
---
 www/board/agenda/Gemfile                      | 1 -
 www/board/agenda/views/actions/minute.json.rb | 3 ++-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/www/board/agenda/Gemfile b/www/board/agenda/Gemfile
index d89f956..3f762f1 100644
--- a/www/board/agenda/Gemfile
+++ b/www/board/agenda/Gemfile
@@ -21,7 +21,6 @@ gem 'listen', ('~> 3.0.7' if RUBY_VERSION =~ /^2\.[01]/)
 gem 'activesupport'
 gem 'mail'
 gem 'erubis'
-gem 'tzinfo', '~> 2.0'
 
 gem 'websocket-eventmachine-server'
 gem 'websocket-client-simple'
diff --git a/www/board/agenda/views/actions/minute.json.rb b/www/board/agenda/views/actions/minute.json.rb
index 98c6f7f..4c889bc 100644
--- a/www/board/agenda/views/actions/minute.json.rb
+++ b/www/board/agenda/views/actions/minute.json.rb
@@ -1,6 +1,7 @@
 #
 # Add secretarial minutes to a given agenda item
 #
+require 'active_support/core_ext/time'
 
 @minutes = @agenda.sub('_agenda_', '_minutes_')
 minutes_file = "#{AGENDA_WORK}/#{@minutes.sub('.txt', '.yml')}"
@@ -17,7 +18,7 @@ if @action == 'timestamp'
   timestamp = Time.now
 
   tz = TZInfo::Timezone.get('America/Los_Angeles')
-  @text = tz.to_local(timestamp).strftime('%-l:%M')
+  @text = timestamp.in_time_zone(tz).strftime('%-l:%M')
 
   if @title == 'Call to order'
     minutes['started']  = timestamp.gmtime.to_f * 1000


Mime
View raw message