Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • Q quickfix
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 48
    • Issues 48
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 25
    • Merge requests 25
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Package Registry
    • Infrastructure Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • quickfixgo
  • quickfix
  • Merge requests
  • !286

Use timestamp with time zone for postgres sql

  • Review changes

  • Download
  • Email patches
  • Plain diff
Merged Administrator requested to merge github/fork/anphung/fix/postgres-sql into master Jul 05, 2017
  • Overview 2
  • Commits 1
  • Pipelines 0
  • Changes 3

Created by: anphung

Without time zone:

  • When creation_time is saved to db, it is save as local time e.g +0200 EET
  • When creation_time is read from db, it is read as +0000 +0000 E.g:
  1. creation_time is initialized: 2014-03-26 17:05:30.889109334 +0200 EET
  2. Save into db it becomes: 2014-03-26 17:05:30.889109
  3. Read from db to creation_time, it becomes: 2014-03-26 17:05:30.889109 +0000 +0000

=> (1) != (3)

With time zone: (1) == (3)

Reference: https://github.com/lib/pq/pull/247#issuecomment-38695036

Assignee
Assign to
Reviewers
Request review from
Time tracking
Source branch: github/fork/anphung/fix/postgres-sql