开发者

rails TZInfo localize a timestring

I'm using TZInfo for localization and DST compatible timezone handling. My problem is that i'm开发者_C百科 generating an email message out of a cronjob and localization method does not work there, what it does is it uses the application's default timezone in environment.rb and displays the time w.r.t that zone. what i want is it should still use my actual timezone settings. For that i would like something like the following:

<%= l log.created_at.in_time_zone("Eastern Time (US & Canada)" %>

something like that.

is there any way i can do this. any method available that does not break the DST thing, coz the reason i'm using TZInfo is DST compatible time conversions.

Regards

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜