![]() |
Time#utc() : utc() is a Time class method which returns the conversion of time to UTC (GMT), modifying the receiver.
Example #1 :
Output : Time a : 2019-01-01 00:00:00 +0000 Time b : 2019-10-01 00:00:00 +0000 Time c : 2019-12-31 00:00:00 +0000 Time a utc form : 2019-01-01 00:00:00 UTC Time b utc form : 2019-10-01 00:00:00 UTC Time c utc form : 2019-12-31 00:00:00 UTC Example #2 :
Output : Time a : 2019-08-27 09:21:54 +0000 Time b : 1000-10-10 00:00:00 +0000 Time c : 2020-12-01 00:00:00 +0000 Time a utc form : 2019-08-27 09:21:54 UTC Time b utc form : 1000-10-10 00:00:00 UTC Time c utc form : 2020-12-01 00:00:00 UTC |
Reffered: https://www.geeksforgeeks.org
Ruby |
Related |
---|
![]() |
![]() |
![]() |
![]() |
![]() |
Type: | Geek |
Category: | Coding |
Sub Category: | Tutorial |
Uploaded by: | Admin |
Views: | 8 |