Please be aware that the content in SAP SQL Anywhere Forum will be migrated to the SAP Community in June and this forum will be retired.

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

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
accept rate: 34%

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

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

In the option "PUBLIC.time_zone" with "Simulated Time Zones" seems to do this in the current version (Anywhere 17)

STARTING 'Oct/Sun>=1' AT '2:00'
ENDING 'Apr/Sun>=1' AT '2:00';

SET OPTION PUBLIC.time_zone='NewSouthWales';
permanent link

answered 23 Dec '21, 05:58

tedfroehlich's gravatar image

accept rate: 20%

Your answer
toggle preview

Follow this question

By Email:

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



Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text]( "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:


question asked: 24 Feb '12, 07:24

question was seen: 3,405 times

last updated: 23 Dec '21, 05:58