回答

2

嘗試:

Time.parse(var1.to_s).utc 

假設VAR1持有DateTime對象。

+0

謝謝你對我最好的迴應。問候! – hyperrjas 2013-04-11 10:23:44

+0

很高興幫助;) – 2013-04-11 10:29:53