king_of_time 0.1.1 → 0.1.2

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
  SHA1:
3
- metadata.gz: ae09a1b16156a5bcbc32b869173b2141e6085e4a
4
- data.tar.gz: 2c8ae6209d4123f1af6cabc9401319fd8b05e31b
3
+ metadata.gz: c740807ebced56ec71dc40fb122681931965b3cb
4
+ data.tar.gz: 2579b4c31c7d9789501f27b939a7ce08f3f45fd3
5
5
  SHA512:
6
- metadata.gz: 8e663668448f9fad9b5131ef0bc52cc34eab7636bacc171fd2a37ab4a2012df45922c69027a696d20525cdb7de77f972c3b61ff875336a5ec709d360f08399cc
7
- data.tar.gz: 357e447dafae37c2749319ccc55420757e5aa33092cea9f7205ac049f309a887163d9cf05bf9b8fe21400d5fbd33e4b75f3b9a963b49ab036a382857df60218e
6
+ metadata.gz: ec99ee654105814bdddcf604ba195751fa1987d017bce93c0c747ffe965b933fefe7217ca95800a93ac3994dff3502dbc4fdacf9d7ced4b9b987fecbb349a8af
7
+ data.tar.gz: 81d60189287c7c7d95f1f4f787af16194ba897542512fd5c3c3bfd7eade166c9212920b00d4b0eb246befeabd522bd7a6c1f31089d00ae8d8380d676173984d2
data/README.md CHANGED
@@ -31,6 +31,8 @@ Or install it yourself as:
31
31
 
32
32
 
33
33
  ```ruby
34
+ require 'king_of_time'
35
+
34
36
  king_of_time = KingOfTime.new({
35
37
  timerecorder_id: 1111111111,
36
38
  employee_id: 2222222222,
@@ -55,6 +57,7 @@ king_of_time.check_out
55
57
  ## Future work
56
58
 
57
59
  - I18n
60
+ - Timezone (Currently fixed with +9:00)
58
61
 
59
62
  ## Development
60
63
 
data/lib/king_of_time.rb CHANGED
@@ -47,13 +47,15 @@ class KingOfTime
47
47
  end_break: 4
48
48
  }
49
49
 
50
+ now_with_time_zone = Time.now.getlocal('+09:00')
51
+
50
52
  params = @param.merge({
51
53
  recording_type_code: codes[type],
52
54
  device_type_code:4,
53
- recording_time: Time.now.strftime('%Y%m%d%H%M%S'),
54
- now: Time.now.to_i,
55
+ recording_time: now_with_time_zone.strftime('%Y%m%d%H%M%S'),
56
+ now: now_with_time_zone.to_i,
55
57
  kot_url: 'https://s3.kingtime.jp/gateway/gaegateway?page_id=/gaegateway/',
56
- log: Time.now.strftime('%m/%d %H:%M') + ' ' + messages[type] + ' ' + @param[:name]
58
+ log: now_with_time_zone.strftime('%m/%d %H:%M') + ' ' + messages[type] + ' ' + @param[:name]
57
59
  # input_password: '', # not necessary
58
60
  })
59
61
 
@@ -1,3 +1,3 @@
1
1
  class KingOfTime
2
- VERSION = '0.1.1'.freeze
2
+ VERSION = '0.1.2'.freeze
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: king_of_time
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Yuki Matsukura