We host database for some online applications and some of our new customers are located in another timezone.

Since we have all database running in just one box, is that possible to configure timezone in database/db server, this way sa will not use OS timezone.

asked 24 Feb '12, 07:24

Zote's gravatar image

Zote
1.7k364050
accept rate: 43%


What version are you using?

AFAIK, v12 has introduced the new data type TIMESTAMP WITH TIME ZONE and the new special value CURRENT UTC TIMESTAMP exactly for such use cases.

permanent link

answered 24 Feb '12, 07:43

Volker%20Barth's gravatar image

Volker Barth
31.5k318461676
accept rate: 33%

edited 24 Feb '12, 07:45

Actually it's all in 11. We are planning to upgrade to 12 this year.

(24 Feb '12, 07:44) Zote

FYI, DEFAULT UTC TIMESTAMP and CURRENT UTC TIMESTAMP have been around since version 8, but before version 12 their type was TIMESTAMP.

(27 Feb '12, 11:01) Graham Hurst
Replies hidden

Now I'm somewhat puzzled what exactly has been improved with v12:

  • Does v8+ (and the "time_zone_adjustment" option) allow a client to adjust the display of UTC time values to the local timezone (i.e. it allows to correct between displayed and stored times? (But one should still store UTC times in case different time zones do matter, e.g. with the help of DEFAULT/CURRENT UTC TIMESTAMP.)

  • Whereas the v12 TIMESTAMP WITH TIME ZONE type allows the storage of times with local time zone information, so clients do not need to adjust the display, and the time can still be stored in a standardized way?

(27 Feb '12, 12:24) Volker Barth
1

Before version 12, one always needed to know what timezone was used for values in timestamp columns. All that DEFAULT/CURRENT UTC TIMESTAMP provided were ways to get UTC timestamps instead of the timestamps in the local server OS timezone provided by DEFAULT/CURRENT TIMESTAMP.

(27 Feb '12, 16:06) Graham Hurst
Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:

×5
×3
×1

question asked: 24 Feb '12, 07:24

question was seen: 1,178 times

last updated: 27 Feb '12, 16:06