If I have d = DateTime.now, how do I convert \'d\' into UTC (with the appropriate date)?
d = DateTime.now
In irb:
>>d = DateTime.now => # >> "#{d.hour.to_i - d.zone.to_i}:#{d.min}:#{d.sec}" => "11:16:41"
will convert the time to the utc. But as posted if it is just Time you can use:
Time.now.utc
and get it straight away.