summaryrefslogtreecommitdiff
path: root/src/backend/utils/adt/timestamp.c
Commit message (Collapse)AuthorAgeFilesLines
* Move some system includes into c.h, and remove duplicates.Bruce Momjian1999-07-171-2/+1
|
* Final cleanup.Bruce Momjian1999-07-161-1/+1
|
* Clean up #include in /include directory. Add scripts for checking includes.Bruce Momjian1999-07-151-1/+0
|
* Cleanup of /include #include's, for 6.6 only.Bruce Momjian1999-07-141-0/+1
|
* Renaming cleanup, no pgindent yet.Bruce Momjian1998-09-011-9/+9
|
* pgindent run before 6.3 release, with Thomas' requested changes.Bruce Momjian1998-02-261-13/+13
|
* Change a few routine names back to full length now that pg_proc allowsThomas G. Lockhart1997-12-231-4/+4
| | | | names over 16 characters. datet_datetime() -> datetime_datetime(), etc.
* Shorten routine names to <= 16 characters to fit in pg_proc table.Thomas G. Lockhart1997-10-251-17/+8
|
* Support special values 'now', 'current', etc on output.Thomas G. Lockhart1997-10-091-23/+25
|
* Remove difftime() calls.Thomas G. Lockhart1997-09-161-126/+28
| | | | Still uses time_t declarations, but most code will be changed for next release.
* Used modified version of indent that understands over 100 typedefs.Bruce Momjian1997-09-081-1/+1
|
* Another PGINDENT run that changes variable indenting and case label ↵Bruce Momjian1997-09-081-21/+21
| | | | indenting. Also static variable indenting.
* Massive commit to run PGINDENT on all *.c and *.h files.Bruce Momjian1997-09-071-60/+66
|
* Fix for sunos4 difftime() call.Bruce Momjian1997-08-191-1/+1
|
* Remove sparc dir, add difftime macro for sunos.Bruce Momjian1997-07-281-0/+5
|
* Use common parser and encoder for timestamp data type.Thomas G. Lockhart1997-07-011-3/+21
| | | | | | Remove older date and time code (retain NEW_DATE_CODE and NEW_TIME_CODE). Use common encoder for date and time. Fix datetime +/- timespan math bug.
* Fix timezone manipulation code to avoid crashes on some machines.Thomas G. Lockhart1997-05-111-1/+2
| | | | | | | Add type conversion functions for floating point numbers. Check for zero in unary minus floating point code (IEEE allows an explicit negative zero which looks ugly in a query result!). Ensure circle type has non-negative radius.
* From: "D'Arcy J.M. Cain" <darcy@druid.net>Marc G. Fournier1997-04-031-9/+89
| | | | | | | | | | | Subject: [HACKERS] timestamp.c changes I sent in changes previously and they were rejected because they didn't follow ANSI spec. Here is the input part of the changes again. Even though it allows more flexibility for inputting different formats, it is also backwards compatible with the standard version. I have also not changed the output format so it will still output the ANSI forms. Is this acceptable to everyone?
* From: Thomas Lockhart <Thomas.G.Lockhart@jpl.nasa.gov>Marc G. Fournier1997-04-021-0/+20
| | | | | | | | | | | | | | | | | | | | | | | | | Subject: [HACKERS] More date time functions Here are some additional patches mostly related to the date and time data types. It includes some type conversion routines to move between the different date types and some other date manipulation routines such as date_part(units,datetime). I noticed Edmund Mergl et al's neat trick for getting function overloading for builtin functions, so started to use that for the date and time stuff. Later, if someone figures out how to get function overloading directly for internal C code, then we can move to that technique. These patches include documentation updates (don't faint!) for the built-in man page. Doesn't yet include mention of timestamp, since I don't know much about it and since it may change a bit to become a _real_ ANSI timestamp which would include parser support for the declaration syntax (what do you think, Dan?). The patches were developed on the 970330 release, but have been rebuilt off of the 970402 release. The first patch below is to get libpq to compile, on my Linux box, but is not related to the rest of the patches and you can choose not to apply that one at this time. Thanks in advance, scrappy!
* From: "D'Arcy J.M. Cain" <darcy@druid.net>Marc G. Fournier1997-03-251-32/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Subject: [HACKERS] backend/utils/adt/timestamp.c Back to this timezone stuff. The struct tm has a field (tm_gmtoff) which is the offset from UTC (GMT is archaic BTW) in seconds. Is this the value you are looking for when you use timezone? Note that this applies to NetBSD but it does not appear to be in either ANSI C or POSIX. This looks like one of those things that is just going to have to be hand coded for each platform. Why not just store the values in UTC and use localtime instead of gmtime when retrieving the value? Also, you assume the time is returned as a 4 byte integer. In fact, there is not even any requirement that time be an integral value. You should use time_t here. The input function seems unduly restrictive. Somewhere in the sources there is an input function that allows words for months. Can't we do the same here? There is a standard function, difftime, for subtracting two times. It deals with cases where time_t is not integral. There is, however, a small performance hit since it returns a double and I don't believe there is any system currently which uses anything but an integral for time_t. Still, this is technically the correct and portable thing to do. The returns from the various comparisons should probably be a bool.
* Missed another tar file... :(Marc G. Fournier1997-03-141-0/+98