Skip to content

Commit 7547b01

Browse files
author
Thomas G. Lockhart
committed
Define CEST as a synonym for Central European Savings Time
per Jan Varga <varga@utcru.sk> Fix up spacing and formatting.
1 parent bd97e4e commit 7547b01

File tree

2 files changed

+10
-17
lines changed

2 files changed

+10
-17
lines changed

src/backend/utils/adt/datetime.c

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
*
99
*
1010
* IDENTIFICATION
11-
* $Header: /cvsroot/pgsql/src/backend/utils/adt/datetime.c,v 1.69 2001/10/04 17:10:11 tgl Exp $
11+
* $Header: /cvsroot/pgsql/src/backend/utils/adt/datetime.c,v 1.70 2001/10/05 06:38:59 thomas Exp $
1212
*
1313
*-------------------------------------------------------------------------
1414
*/
@@ -98,6 +98,7 @@ static datetkn datetktbl[] = {
9898
{"cat", TZ, NEG(60)}, /* Central Alaska Time */
9999
{"cct", TZ, 48}, /* China Coast */
100100
{"cdt", DTZ, NEG(30)}, /* Central Daylight Time */
101+
{"cest", DTZ, 12}, /* Central European Dayl.Time */
101102
{"cet", TZ, 6}, /* Central European Time */
102103
{"cetdst", DTZ, 12}, /* Central European Dayl.Time */
103104
{"cst", TZ, NEG(36)}, /* Central Standard Time */
@@ -772,11 +773,7 @@ DecodeDateTime(char **field, int *ftype, int nf,
772773
case DTK_NOW:
773774
tmask = (DTK_DATE_M | DTK_TIME_M | DTK_M(TZ));
774775
*dtype = DTK_DATE;
775-
#if NOT_USED
776-
GetCurrentTime(tm);
777-
#else
778776
GetCurrentTimeUsec(tm, fsec);
779-
#endif
780777
if (tzp != NULL)
781778
*tzp = CTimeZone;
782779
break;
@@ -1151,11 +1148,7 @@ DecodeTimeOnly(char **field, int *ftype, int nf,
11511148
case DTK_NOW:
11521149
tmask = DTK_TIME_M;
11531150
*dtype = DTK_TIME;
1154-
#if NOT_USED
1155-
GetCurrentTime(tm);
1156-
#else
11571151
GetCurrentTimeUsec(tm, fsec);
1158-
#endif
11591152
break;
11601153

11611154
case DTK_ZULU:

src/backend/utils/adt/timestamp.c

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
*
99
*
1010
* IDENTIFICATION
11-
* $Header: /cvsroot/pgsql/src/backend/utils/adt/timestamp.c,v 1.54 2001/10/04 14:49:57 tgl Exp $
11+
* $Header: /cvsroot/pgsql/src/backend/utils/adt/timestamp.c,v 1.55 2001/10/05 06:38:59 thomas Exp $
1212
*
1313
*-------------------------------------------------------------------------
1414
*/
@@ -1400,8 +1400,8 @@ interval_accum(PG_FUNCTION_ARGS)
14001400
memcpy(&N, DatumGetIntervalP(transdatums[1]), sizeof(Interval));
14011401

14021402
newsum = DatumGetIntervalP(DirectFunctionCall2(interval_pl,
1403-
IntervalPGetDatum(&sumX),
1404-
IntervalPGetDatum(newval)));
1403+
IntervalPGetDatum(&sumX),
1404+
IntervalPGetDatum(newval)));
14051405
N.time += 1;
14061406

14071407
transdatums[0] = IntervalPGetDatum(newsum);
@@ -1856,7 +1856,7 @@ timestamp_trunc(PG_FUNCTION_ARGS)
18561856
if (VARSIZE(units) - VARHDRSZ > MAXDATELEN)
18571857
elog(ERROR, "Interval units '%s' not recognized",
18581858
DatumGetCString(DirectFunctionCall1(textout,
1859-
PointerGetDatum(units))));
1859+
PointerGetDatum(units))));
18601860
up = VARDATA(units);
18611861
lp = lowunits;
18621862
for (i = 0; i < (VARSIZE(units) - VARHDRSZ); i++)
@@ -1943,7 +1943,7 @@ timestamptz_trunc(PG_FUNCTION_ARGS)
19431943
if (VARSIZE(units) - VARHDRSZ > MAXDATELEN)
19441944
elog(ERROR, "Interval units '%s' not recognized",
19451945
DatumGetCString(DirectFunctionCall1(textout,
1946-
PointerGetDatum(units))));
1946+
PointerGetDatum(units))));
19471947
up = VARDATA(units);
19481948
lp = lowunits;
19491949
for (i = 0; i < (VARSIZE(units) - VARHDRSZ); i++)
@@ -2032,7 +2032,7 @@ interval_trunc(PG_FUNCTION_ARGS)
20322032
if (VARSIZE(units) - VARHDRSZ > MAXDATELEN)
20332033
elog(ERROR, "Interval units '%s' not recognized",
20342034
DatumGetCString(DirectFunctionCall1(textout,
2035-
PointerGetDatum(units))));
2035+
PointerGetDatum(units))));
20362036
up = VARDATA(units);
20372037
lp = lowunits;
20382038
for (i = 0; i < (VARSIZE(units) - VARHDRSZ); i++)
@@ -2569,7 +2569,7 @@ interval_part(PG_FUNCTION_ARGS)
25692569
default:
25702570
elog(ERROR, "Interval units '%s' not supported",
25712571
DatumGetCString(DirectFunctionCall1(textout,
2572-
PointerGetDatum(units))));
2572+
PointerGetDatum(units))));
25732573
result = 0;
25742574
}
25752575

@@ -2594,7 +2594,7 @@ interval_part(PG_FUNCTION_ARGS)
25942594
{
25952595
elog(ERROR, "Interval units '%s' not recognized",
25962596
DatumGetCString(DirectFunctionCall1(textout,
2597-
PointerGetDatum(units))));
2597+
PointerGetDatum(units))));
25982598
result = 0;
25992599
}
26002600

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy