Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
TimeZone parameter in postgresql.conf
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  3 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Majid Azimi  
View profile  
 More options Sep 5 2012, 2:03 pm
Newsgroups: pgsql.novice
From: majid.merk...@gmail.com (Majid Azimi)
Date: Wed, 5 Sep 2012 22:33:11 +0430
Local: Wed, Sep 5 2012 2:03 pm
Subject: TimeZone parameter in postgresql.conf

postgresql documentation says:

All timezone-aware dates and times are stored internally in UTC. They are
converted to local time in the zone specified by the timezone configuration
parameter before being displayed to the client.

timezone parameter is a session
parameter<http://www.postgresql.org/docs/9.1/static/runtime-config-client.html#...>.
When all TIMESTAMP WITH TIME ZONEs will be stored as UTC and the client
connection will specify the session timezone, then what is the benefit of
setting TimeZone parameter in postgresql.conf?


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Steve Crawford  
View profile  
 More options Sep 5 2012, 2:56 pm
Newsgroups: pgsql.novice
From: scrawf...@pinpointresearch.com (Steve Crawford)
Date: Wed, 05 Sep 2012 11:56:14 -0700
Local: Wed, Sep 5 2012 2:56 pm
Subject: Re: TimeZone parameter in postgresql.conf

On 09/05/2012 11:03 AM, Majid Azimi wrote:

> postgresql documentation says:

>     All timezone-aware dates and times are stored internally in UTC.
>     They are converted to local time in the zone specified by the
>     timezone configuration parameter before being displayed to the client.

> timezone parameter is a session parameter
> <http://www.postgresql.org/docs/9.1/static/runtime-config-client.html#...>.
> When all |TIMESTAMP WITH TIME ZONE|s will be stored as |UTC| and the
> client connection will specify the session timezone, then what is the
> benefit of setting TimeZone parameter in postgresql.conf?

http://www.postgresql.org/docs/9.1/static/datatype-datetime.html#DATA...

...

The timezone
<http://www.postgresql.org/docs/9.1/static/runtime-config-client.html#...>
configuration parameter can be set in the file postgresql.conf, or in
any of the other standard ways described in Chapter 18
<http://www.postgresql.org/docs/9.1/static/runtime-config.html>. There
are also several special ways to set it:

  *

    If timezone is not specified in postgresql.conf or as a server
    command-line option, the server attempts to use the value of the TZ
    environment variable as the default time zone. If TZ is not defined
    or is not any of the time zone names known to PostgreSQL, the server
    attempts to determine the operating system's default time zone by
    checking the behavior of the C library function localtime(). The
    default time zone is selected as the closest match among
    PostgreSQL's known time zones. (These rules are also used to choose
    the default value of log_timezone
    <http://www.postgresql.org/docs/9.1/static/runtime-config-logging.html...>,
    if not specified.)

  *

    The SQL command SET TIME ZONE sets the time zone for the session.
    This is an alternative spelling of SET TIMEZONE TO with a more
    SQL-spec-compatible syntax.

  *

    The PGTZ environment variable is used by libpq clients to send a SET
    TIME ZONE command to the server upon connection.

...

In other words is is an explicit default time zone but like many other
defaults specified in postgresql.conf you can override it in a session.

Cheers,
Steve


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Jeff Davis  
View profile  
 More options Sep 5 2012, 8:48 pm
Newsgroups: pgsql.novice
From: pg...@j-davis.com (Jeff Davis)
Date: Wed, 05 Sep 2012 17:48:27 -0700
Local: Wed, Sep 5 2012 8:48 pm
Subject: Re: TimeZone parameter in postgresql.conf

On Wed, 2012-09-05 at 22:33 +0430, Majid Azimi wrote:
> postgresql documentation says:

>         All timezone-aware dates and times are stored internally in
>         UTC. They are converted to local time in the zone specified by
>         the timezone configuration parameter before being displayed to
>         the client.

> timezone parameter is a session parameter. When all TIMESTAMP WITH
> TIME ZONEs will be stored as UTC and the client connection will
> specify the session timezone, then what is the benefit of setting
> TimeZone parameter in postgresql.conf?

It's essentially just a default so that you don't have to specify it in
the session.

Regards,
        Jeff Davis

--
Sent via pgsql-novice mailing list (pgsql-nov...@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-novice


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »