Date of:
#!/usr/bin/ruby -w date = Time.new
In the above example, for example, 10/01/15 will be displayed
And for time
time = Time.new
The above will display for example 11:33
Then, to compose it, add at the end:
puts date + " " + time
joe_young Jan 10 '15 at 11:33 2015-01-10 11:33
source share