I want to read a database column value to use in my app.That is
t.timestamp.I use it like this:
<%=user.created_at-%>,but the displayed time is based on utc while
what i want it to be is chinese BeiJing time.How do i manage this? set
config.time_zone? The stored time data value is different from the
displayed time data value?
any one help me?
I recommend you store the data in your database in UTC format. You
can always reformat the data being displayed to local time zone.
Have a look at the tzinfo plugin for proper conversion to local time
with day light savings, etc