How to properly extract a time only from the datetime object (post.created_at, to be precise) with/without the influence of TimeZone? How to extract the day, month and year values? How to extract the day/month/year via a custom pattern (is it possible)?
How to properly extract a time only from the datetime object ( post.created_at ,
Share
Time in String format:
Link for the
strftimedocumentation:http://ruby-doc.org/core/classes/Time.html#method-i-strftime
For getting the hour, minute and second values: