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 +4 -4
- data/README.md +3 -0
- data/lib/king_of_time.rb +5 -3
- data/lib/king_of_time/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c740807ebced56ec71dc40fb122681931965b3cb
|
4
|
+
data.tar.gz: 2579b4c31c7d9789501f27b939a7ce08f3f45fd3
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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:
|
54
|
-
now:
|
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:
|
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
|
|
data/lib/king_of_time/version.rb
CHANGED