time-zone 1.1.0 → 1.1.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: e87828391a79bc472c63dabacbb85b98438e428c396506114e74188608710a82
4
- data.tar.gz: aa45a0f8fc9ef29e3dafe0e4b090f1b999e0d0f98c071b147c9fa014eae4030b
3
+ metadata.gz: 52752447d16bc54a681fd7b9c52044ec510beddbf3315f652220626d9061bda7
4
+ data.tar.gz: 2a5ff164080ab6b044a9c3d802d9fd6c7eba5c69dfda7ce08893b86bb95bde1b
5
5
  SHA512:
6
- metadata.gz: 6c547d0b8324fa6120e152869a395b9658dbc07a5c5556886efc1ee7664b88af481ad7b086654b11d85d505ca8b55885c6638b0da21bc51d653e0410c561a31d
7
- data.tar.gz: a1bad96bd14f8932432ef9349573b5e00badd6c075ba305ecb8451fba404fd5064273bfa5179d6d9c945a2000b4e2ced0b97fc192f5c0bab83487a041622b0c1
6
+ metadata.gz: ed6bbebdf2ac66fbfec90825c05a0865d9d76db96fa2087d060af28eefadf5154e09a3c9e85b674e23921606bac3562a1283908ccfdf6d5bf49570e0a6fee0c5
7
+ data.tar.gz: c1766ccf1db79f3a540af53b679dc2f1e9f53c590649cc03035a91276abaf81f0087cc5d627ba486ea9e21541d9cdaaf05880f28c634896dac733d2ed28cf423
@@ -0,0 +1,13 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ # https://bugs.ruby-lang.org/issues/14879
4
+ require 'time'
5
+
6
+ ENV['TZ'] = "Pacific/Auckland"
7
+ time = Time.parse("5pm")
8
+ ENV['TZ'] = "UTC"
9
+
10
+ puts time
11
+ puts time.utc_offset
12
+ puts (time + 1).utc_offset
13
+ puts time + 1
@@ -49,6 +49,8 @@ class Time
49
49
  end
50
50
 
51
51
  def self.parse(string, zone = "UTC", *args)
52
+ string = string.dup
53
+
52
54
  if string.sub!(/\s([a-zA-Z][\w]*(\/[\w]+)?)$/, "")
53
55
  zone = $1
54
56
  end
@@ -20,6 +20,6 @@
20
20
 
21
21
  class Time
22
22
  module Zone
23
- VERSION = "1.1.0"
23
+ VERSION = "1.1.1"
24
24
  end
25
25
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: time-zone
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.0
4
+ version: 1.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Samuel Williams
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-06-29 00:00:00.000000000 Z
11
+ date: 2018-06-30 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -65,6 +65,7 @@ files:
65
65
  - Gemfile
66
66
  - README.md
67
67
  - Rakefile
68
+ - bug14879.rb
68
69
  - lib/time/zone.rb
69
70
  - lib/time/zone/locking.rb
70
71
  - lib/time/zone/timestamp.rb