utc_on_demand 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/Gemfile.lock +1 -1
- data/README.md +22 -4
- data/lib/utc_on_demand/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: f1cf0505cb7dc0f98192817c61ea7fea36bc908f
|
4
|
+
data.tar.gz: 1fc4707e583be0a3bfa9c8be100bc3aeba772764
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f60e09c52b3189ed5a6a781a723625abab92ea27ddbd340a2c5c7626a832076baf2149f5e9ebe48cbeab2ffbcf933acc8b0d75ba0ea17338f73b18319688e24b
|
7
|
+
data.tar.gz: 374d4abb22cd94db0bb97521e81a94009cfd2c118512dd6849673dac9b81b849345d5f72cadefb953337c13caec6d2250792c4d9f6ca8bedf717f8ec89b8f743
|
data/Gemfile.lock
CHANGED
data/README.md
CHANGED
@@ -1,8 +1,6 @@
|
|
1
1
|
# UtcOnDemand
|
2
2
|
|
3
|
-
|
4
|
-
|
5
|
-
TODO: Delete this and the text above, and describe your gem
|
3
|
+
Display your machine's current time (in your timezone) and in UTC.
|
6
4
|
|
7
5
|
## Installation
|
8
6
|
|
@@ -22,7 +20,27 @@ Or install it yourself as:
|
|
22
20
|
|
23
21
|
## Usage
|
24
22
|
|
25
|
-
|
23
|
+
Installing the gem will place the executable `utc`. Calling `utc` from the command line will return:
|
24
|
+
|
25
|
+
$ utc
|
26
|
+
EST: 2018-01-17 19:39:50 -0500
|
27
|
+
UTC: 2018-01-18 00:39:50 UTC
|
28
|
+
|
29
|
+
Where, the first line returns your current system's time (in the configured timezone). The second line displays your current system time in UTC.
|
30
|
+
|
31
|
+
If you would like to convert a specific time to UTC, please add a argument to `utc`.
|
32
|
+
|
33
|
+
$ utc 1:35pm
|
34
|
+
EST: 2018-01-17 13:35:00 -0500
|
35
|
+
UTC: 2018-01-17 18:35:00 UTC
|
36
|
+
|
37
|
+
It can also take a string argument and parse it. This implements ruby's built in `Time` library's `#parse` function.
|
38
|
+
|
39
|
+
$ utc "2017/12/25 11:00am"
|
40
|
+
EST: 2017-12-25 11:00:00 -0500
|
41
|
+
UTC: 2017-12-25 16:00:00 UTC
|
42
|
+
|
43
|
+
Enjoy!
|
26
44
|
|
27
45
|
## Development
|
28
46
|
|