SitePoint Sponsor

User Tag List

Results 1 to 3 of 3
  1. #1
    SitePoint Member
    Join Date
    Mar 2008
    Posts
    22
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Question Correcting timestamps to DB

    I generated a scaffold. There I notice that the published_at component is 1 hour behind. The component displayed 2012-May 8 13-34 when it's supposed to be an hour ahead.

    In sqlite, the published_at time is shown as 2012-05-08 19:34:00.000000. Also the created_at and up_dated_at are off as well. created_at: 2012-05-08 18:34:02.795241 updated_at: 2012-05-08 18:34:02.795241

    My configs:
    config.time_zone = 'Eastern Time (US & Canada)' config.active_record.default_timezone = :local

    When I run rake time:zone:local
    * UTC -05:00 *
    Bogota
    Eastern Time (US & Canada)
    Indiana (East)
    Lima
    Quito

    But I'm still experiencing the incorrect time issue.

    I've been searching but I'm not finding anything solid to a solution. How can I correct these issues so that the values are entered in correctly?

    Please help

    Thanks in advance.

  2. #2
    Programming Team silver trophybronze trophy
    Mittineague's Avatar
    Join Date
    Jul 2005
    Location
    West Springfield, Massachusetts
    Posts
    16,439
    Mentioned
    160 Post(s)
    Tagged
    1 Thread(s)
    Daylight Savings Time?

    If a live server, is it where you think it is?

  3. #3
    SitePoint Member
    Join Date
    Mar 2008
    Posts
    22
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I believe DST is active on my local server.
    The time is correct on the server just not when my app posts in the db.


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •