Skip to content

Adapter always reads datetime in local timezone #266

@hrp

Description

@hrp

I have a SQLServer 2008 database that has a datetime stored in UTC. However when I access this data (via a stored procedure) it is always picked up in the web server's timezone.

For instance:

"2010-10-30 11:30:00" => "2010-10-30 11:30:00 -0700"

The adapter seems to be assuming that the time is stored in the SQL DB in the same timezone as the web server. This has been confirmed by changing the server's timezone.

No setting in Rails seems to impact this. Also this seems to be counter Rails defaults which assume that times in the DB are stored in UTC.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions