Ok I figured it out... helps to RTFM but I have to say examples help
dummies in a rush (me!)
otime = tz.strftime("%H:%M %Z", next_time)
tom
On 11/15/2012 10:12 PM, Thomas A. Moulton wrote:
How can I use strftime to display a time in the format "20:45 EDT"
I looked at
http://tzinfo.rubyforge.org/doc/classes/TZInfo/Timezone.html#M000060
and think that "%H:%M %Z" would do it, but no joy.
now = DateTime.now.new_offset(0)
ltime = tz.utc_to_local(now)
otime = ltime.strftime("%H:%M %Z")
returns "14:07 +00:00"
Can anyone provide an example for me?
Tom
_______________________________________________
TZInfo-users mailing list
[email protected]
http://rubyforge.org/mailman/listinfo/tzinfo-users
_______________________________________________
TZInfo-users mailing list
[email protected]
http://rubyforge.org/mailman/listinfo/tzinfo-users