summaryrefslogtreecommitdiff
path: root/src/timezone
AgeCommit message (Collapse)Author
2006-11-01Update zic database to tzdata2006n.Tom Lane
2006-10-24Tweak zic.c to compile cleanly on MSVC: use CopyFile instead ofTom Lane
CopyFileEx. This avoids a warning about the function not being present on older Windows versions. Magnus Hagander
2006-10-19Add externs for optarg/optind where apparently needed. Per Magnus.Tom Lane
2006-10-18Fix up timetz input so that a date is required only when the specifiedTom Lane
timezone actually has a daylight-savings rule. This avoids breaking cases that used to work because they went through the DecodePosixTimezone code path. Per contrib regression failures (mea culpa for not running those yesterday...). Also document the already-applied change to allow GMT offsets up to 14 hours.
2006-10-16Arrange for timezone names to be recognized case-insensitively; forTom Lane
example SET TIME ZONE 'america/new_york' works now. This seems a good idea on general user-friendliness grounds, and is part of the solution to the timestamp-input parsing problems I noted recently.
2006-10-04pgindent run for 8.2.Bruce Momjian
2006-09-16Rename the recently-added pg_timezonenames view to pg_timezone_abbrevs,Tom Lane
and create a new view pg_timezone_names that provides information about the zones known in the 'zic' database. Magnus Hagander, with some additional work by Tom Lane.
2006-09-16Update timezone data files to release 2006k of the zic database.Tom Lane
2006-07-25Add missing @OVERRIDE to 'India' config file, per Michael Fuhr.Tom Lane
Add $PostgreSQL$ lines for CVS identity, too.
2006-07-25Remove hard-wired lists of timezone abbreviations in favor of providingTom Lane
configuration files that can be altered by a DBA. The australian_timezones GUC setting disappears, replaced by a timezone_abbreviations setting (set this to 'Australia' to get the effect of australian_timezones). The list of zone names defined by default has undergone a bit of cleanup, too. Documentation still needs some work --- in particular, should we fix Table B-4, or just get rid of it? Joachim Wieland, with some editorializing by moi.
2006-07-14Remove 576 references of include files that were not needed.Bruce Momjian
2006-07-14Fix a passel of recently-committed violations of the rule 'thou shaltTom Lane
have no other gods before c.h'. Also remove some demonstrably redundant #include lines, mostly of <errno.h> which was added to c.h years ago.
2006-07-14Revert part of recent include patch not ready for application.Bruce Momjian
2006-07-14Add additional includes needed on some platforms.Bruce Momjian
2006-07-11Allow each C include file to compile on its own by including any neededBruce Momjian
header files.
2006-06-07Prepare code to be built by MSVC:Bruce Momjian
o remove many WIN32_CLIENT_ONLY defines o add WIN32_ONLY_COMPILER define o add 3rd argument to open() for portability o add include/port/win32_msvc directory for system includes Magnus Hagander
2006-04-09Suppress a couple of minor compiler warnings, per Magnus.Tom Lane
2006-03-11Add CVS tag lines to files that were lacking them.Bruce Momjian
2006-03-05Update copyright for 2006. Update scripts.Bruce Momjian
2005-12-09Allow installation into directories containing spaces in the name.Peter Eisentraut
2005-11-22Re-run pgindent, fixing a problem where comment lines after a blankBruce Momjian
comment line where output as too long, and update typedefs for /lib directory. Also fix case where identifiers were used as variable names in the backend, but as typedefs in ecpg (favor the backend for indenting). Backpatch to 8.1.X.
2005-10-15Standard pgindent run for 8.1.Bruce Momjian
2005-09-09Fix the various forms of AT TIME ZONE to accept either timezones foundTom Lane
in the zic database or zone names found in the date token table. This preserves the old ability to do AT TIME ZONE 'PST' along with the new ability to do AT TIME ZONE 'PST8PDT'. Per gripe from Bricklen Anderson. Also, fix some inconsistencies in usage of TZ_STRLEN_MAX --- the old code had the potential for one-byte buffer overruns, though given alignment considerations it's unlikely there was any real risk.
2005-09-07Update timezone data files to release 2005m of the zic database.Tom Lane
Among other changes, this reflects the recently passed change in USA daylight savings rules.
2005-07-06Complete zic patch backout by removing NO_PGPORT workaround.Bruce Momjian
2005-07-06Reverse out because the lack of using pgport in timezone/ is causingBruce Momjian
problems: --------------------------------------------------------------------------- Support cross compilation by compiling "zic" with a native compiler. This relies on the output of zic being platform independent, but that is currently the case.
2005-07-04Restructure zic #define fprintf checks to use a NO_PGPORT macro instead.Bruce Momjian
2005-07-04Fix compile if zic because it now doesn't use libpgport.Bruce Momjian
2005-07-04Fix build break for out of tree (vpath) builds, induced by recent zicNeil Conway
changes.
2005-07-03Support cross compilation by compiling "zic" with a native compiler. ThisPeter Eisentraut
relies on the output of zic being platform independent, but that is currently the case.
2005-06-26Tweak dynahash.c to not allocate so many entries at once when dealingTom Lane
with a table that has a small predicted size. Avoids wasting several hundred K on the timezone hash table, which is likely to have only one or a few entries, but the entries use up 10Kb apiece ...
2005-06-20Cosmetic improvements to the timezone code: remove the use of theNeil Conway
'register' qualifier, make some function declarations more consistent, and so on.
2005-06-19Simplify uses of readdir() by creating a function ReadDir() thatTom Lane
includes error checking and an appropriate ereport(ERROR) message. This gets rid of rather tedious and error-prone manipulation of errno, as well as a Windows-specific bug workaround, at more than a dozen call sites. After an idea in a recent patch by Heikki Linnakangas.
2005-06-15This patch makes it possible to use the full set of timezones when doingBruce Momjian
"AT TIME ZONE", and not just the shorlist previously available. For example: SELECT CURRENT_TIMESTAMP AT TIME ZONE 'Europe/London'; works fine now. It will also obey whatever DST rules were in effect at just that date, which the previous implementation did not. It also supports the AT TIME ZONE on the timetz datatype. The whole handling of DST is a bit bogus there, so I chose to make it use whatever DST rules are in effect at the time of executig the query. not sure if anybody is actuallyi *using* timetz though, it seems pretty unpredictable just because of this... Magnus Hagander
2005-06-15>> Do you agree that using a hashtable for it in general is a good ideaBruce Momjian
>> assuming this sideeffect is removed, though? > >I have no problem with the hashtable, only with preloading it with >everything. What I'd like to see is that the table inherited at fork() >contains just the data for the default timezone. (At least in the >normal case where that setting hasn't been changed since postmaster >start.) Here's a patch doing this. Changes score_timezone not to use pg_tzset(), and thus not loading all the zones in the cache. The actual timezone being picked will be set using set_global_timezone() which in turn calls pg_tzset() and loads it in the cache. Magnus Hagander
2005-05-29Modify hash_search() API to prevent future occurrences of the errorTom Lane
spotted by Qingqing Zhou. The HASH_ENTER action now automatically fails with elog(ERROR) on out-of-memory --- which incidentally lets us eliminate duplicate error checks in quite a bunch of places. If you really need the old return-NULL-on-out-of-memory behavior, you can ask for HASH_ENTER_NULL. But there is now an Assert in that path checking that you aren't hoping to get that behavior in a palloc-based hash table. Along the way, remove the old HASH_FIND_SAVE/HASH_REMOVE_SAVED actions, which were not being used anywhere anymore, and were surely too ugly and unsafe to want to see revived again.
2005-05-23More macro cleanups for date/time.Bruce Momjian
2005-04-19Attached patch gets rid of the global timezone in the following steps:Bruce Momjian
* Changes the APIs to the timezone functions to take a pg_tz pointer as an argument, representing the timezone to use for the selected operation. * Adds a global_timezone variable that represents the current timezone in the backend as set by SET TIMEZONE (or guc, or env, etc). * Implements a hash-table cache of loaded tables, so we don't have to read and parse the TZ file everytime we change a timezone. While not necesasry now (we don't change timezones very often), I beleive this will be necessary (or at least good) when "multiple timezones in the same query" is eventually implemented. And code-wise, this was the time to do it. There are no user-visible changes at this time. Implementing the "multiple zones in one query" is a later step... This also gets rid of some of the cruft needed to "back out a timezone change", since we previously couldn't check a timezone unless it was activated first. Passes regression tests on win32, linux (slackware 10) and solaris x86. Magnus Hagander
2005-02-23Properly undef _(x) gettext macro.Bruce Momjian
2005-02-22Use _() macro consistently rather than gettext(). Add translationBruce Momjian
macros around strings that were missing them.
2004-12-31Tag appropriate files for rc3PostgreSQL Daemon
Also performed an initial run through of upgrading our Copyright date to extend to 2005 ... first run here was very simple ... change everything where: grep 1996-2004 && the word 'Copyright' ... scanned through the generated list with 'less' first, and after, to make sure that I only picked up the right entries ...
2004-12-31make clean must remove zic$(X) for Windows, per Magnus.Tom Lane
2004-11-01Invent pg_next_dst_boundary() and rewrite DetermineLocalTimeZone() toTom Lane
use it, as per my proposal of yesterday. This gives us a means of determining the zone offset to impute to an unlabeled timestamp that is both efficient and reliable, unlike all our previous tries involving mktime() and localtime(). The behavior for invalid or ambiguous times at a DST transition is fixed to be really and truly "assume standard time", fixing a bug that has come and gone repeatedly but was back again in 7.4. (There is some ongoing discussion about whether we should raise an error instead, but for the moment I'll make it do what it was previously intended to do.)
2004-10-24Sync timezone data with latest zic database (dated Oct 11 2004).Tom Lane
2004-10-24Update RELEASE_CHANGES to mention updating the timezone database asTom Lane
a routine part of release prep.
2004-10-04Make libpgport be front-end only and make libpgport_srv be a backendBruce Momjian
library that uses palloc, ereport, etc. This simplifies the makefiles for client applications.
2004-09-27Remove inclusion of windows.h now that it is included in c.h, per ideaBruce Momjian
from Peter.
2004-09-08Use _timezone global on Cygwin instead of timezone.Bruce Momjian
2004-09-02Back out timezone detection patch. Tom already applied it.Bruce Momjian
2004-09-02This patch attempts to fix the issue with localized timezones onBruce Momjian
Windows. Recap: When running on a localized windows version, the timezone name returned is also localized, and therefor does not match our lookup table. Solution: The registry contains both the name of the timezone in english and the localized name. The patch adds code to scan the registry for the localized name and gets the english name from that, and then rescans the table. I have tested this on a Swedish WinXP, and it works without problems. The registry layout is the same in Win2k, but I haven't specifically tested it. It's also the same on different languages but again only Swedish is tested. Magnus Hagander