hot-glue 0.6.21 → 0.6.21.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: a3b2bb368a4cdb82730ae64b48bea2e06e8183eeca6b262fe26efa2291710f6d
4
- data.tar.gz: cb9ac4fe4f6175098e940baa602f766bf962367c4b3de9b782c9b5f11a6b1891
3
+ metadata.gz: f79c85d7b5413fe8f12306c5b46de1eedd68c6373ffbab5512a1a57ac22c0e30
4
+ data.tar.gz: d151d9357396d201e1b8a25b59146b7f065b260d38b8f456ece7d798d2b09320
5
5
  SHA512:
6
- metadata.gz: 15dcae458d17b32d08922021b3baafb87a4be7f1d4f2a576aad23b933b532983835458a06c2d71dd2b8eb984c48df50df394a4d9b84e70a3a5ba56590e8e197f
7
- data.tar.gz: d56153ba5db70d8ee003ec4d7ef7b85b99be5161deb09fc0453c52c967c8489b87a0f21596bfc826c6882e61e0aff6f317fa5b2c007ca380251baec876f66397
6
+ metadata.gz: 0e9df1507995d80cc0efc229c29bca7e6e1d52e1a6be0870cbcee4d9cc42cfec85ddf2dd3ec8b710162eff4d800a04f847dcdbd8580220277642026a7e5dbc45
7
+ data.tar.gz: 0271cd11a4848ef7044ac0310cf9064fff0defef82a2e4237c8caf34bb8e660b618f2da3c1f3565e6317b69c10aa3e6bc3e24366a088c4be5e756d6d25cada7e
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- hot-glue (0.6.20)
4
+ hot-glue (0.6.21.1)
5
5
  ffaker (~> 2.16)
6
6
  kaminari (~> 1.2)
7
7
  rails (> 5.1)
@@ -98,8 +98,13 @@ module HotGlue
98
98
 
99
99
  if include_me && params[k].present?
100
100
  if use_timezone
101
+ natural_offset = use_timezone.formatted_offset
102
+ hour = natural_offset.split(":").first
103
+ min = natural_offset.split(":").last
104
+ hour = hour.to_i - 1 if uses_dst && is_dst_now?
101
105
 
102
- parse_date = "#{params[k].gsub("T", " ")} #{use_timezone.formatted_offset}"
106
+ use_offset = "#{hour}:#{min}"
107
+ parse_date = "#{params[k].gsub("T", " ")} #{use_offset}"
103
108
  # note: as according to https://stackoverflow.com/questions/20111413/html5-datetime-local-control-how-to-hide-seconds
104
109
  # there is no way to set the seconds to 00 in the datetime-local input field
105
110
  # as I have implemented a "seconds don't matter" solution,
@@ -112,7 +117,7 @@ module HotGlue
112
117
  else
113
118
  parsed_time = Time.strptime(parse_date, parsables[field_list[k.to_sym]])
114
119
  end
115
- # parsed_time = parsed_time.to_time - 60.minutes if uses_dst && is_dst_now?
120
+
116
121
  params[k] = parsed_time
117
122
  end
118
123
  end
@@ -5,7 +5,7 @@ class TimeField < Field
5
5
  end
6
6
 
7
7
  def form_field_output
8
- "<%= time_field_localized(f, :#{name}, #{singular}.#{name}, label: '#{ name.to_s.humanize }') %>"
8
+ "<%= time_field_localized(f, :#{name}, #{singular}.#{name}&.in_time_zone(current_user.timezone)&.strftime('%H:%M'), label: '#{ name.to_s.humanize }') %>"
9
9
  end
10
10
 
11
11
  def line_field_output
@@ -1,5 +1,5 @@
1
1
  module HotGlue
2
2
  class Version
3
- CURRENT = '0.6.21'
3
+ CURRENT = '0.6.21.2'
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: hot-glue
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.6.21
4
+ version: 0.6.21.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jason Fleetwood-Boldt
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2025-07-05 00:00:00.000000000 Z
11
+ date: 2025-07-10 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails