Skip site navigation (1) Skip section navigation (2)

Re: Australian timezone configure option

From: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
To: Chris Dunlop <chris(at)onthe(dot)net(dot)au>
Cc: pgsql-patches(at)postgresql(dot)org
Subject: Re: Australian timezone configure option
Date: 2001-06-12 03:53:59
Message-ID: 200106120354.f5C3s0402765@candle.pha.pa.us (view raw or flat)
Thread:
Lists: pgsql-hackerspgsql-patches
> Hi,
> 
> Being in Australia, it's always been a minor pain building the support
> for Australian timezone rules by defining USE_AUSTRALIAN_RULES to the
> compiler.  Not to mention the not inconsiderable pain involved in pawing
> through the code and documentation trying to work out why the timezones
> were wrong in the first place.

OK, this patch makes Australian_timezones a GUC option.  It can be set
anytime in psql.  The code uses a static variable to check if the GUC
setting has changed and adjust the C struct accordingly.  I have also
added code to allow the regression tests to pass even if postgresql.conf
has australian_timezones defined.

	test=>  select datetime('2001-01-01 00:00:00 EST');
	       timestamp        
	------------------------
	 2001-01-01 00:00:00-05
	(1 row)
	
	test=> set australian_timezones = true;
	SET VARIABLE
	test=>  select datetime('2001-01-01 00:00:00 EST');
	       timestamp        
	------------------------
	 2000-12-31 09:00:00-05
	(1 row)
	test=> reset all;
	RESET VARIABLE
	test=>  select datetime('2001-01-01 00:00:00 EST');
	       timestamp        
	------------------------
	 2001-01-01 00:00:00-05
	(1 row)

-- 
  Bruce Momjian                        |  http://candle.pha.pa.us
  pgman(at)candle(dot)pha(dot)pa(dot)us               |  (610) 853-3000
  +  If your life is a hard drive,     |  830 Blythe Avenue
  +  Christ can be your backup.        |  Drexel Hill, Pennsylvania 19026

In response to

Responses

pgsql-hackers by date

Next:From: Bruce MomjianDate: 2001-06-12 04:46:38
Subject: Re: Australian timezone configure option
Previous:From: Bruce MomjianDate: 2001-06-12 02:39:21
Subject: Re: Australian timezone configure option

pgsql-patches by date

Next:From: Bruce MomjianDate: 2001-06-12 04:46:38
Subject: Re: Australian timezone configure option
Previous:From: Bruce MomjianDate: 2001-06-12 02:39:21
Subject: Re: Australian timezone configure option

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group