回答

2

尝试:

Time.parse(var1.to_s).utc 

假设VAR1持有DateTime对象。

+0

谢谢你对我最好的回应。问候! – hyperrjas 2013-04-11 10:23:44

+0

很高兴帮助;) – 2013-04-11 10:29:53