interval_out failed to mention 'ago' for negative intervals in SQL and
authorTom Lane <[email protected]>
Tue, 11 Jan 2005 18:34:29 +0000 (18:34 +0000)
committerTom Lane <[email protected]>
Tue, 11 Jan 2005 18:34:29 +0000 (18:34 +0000)
GERMAN datestyles.  Ancient bug reported by Terry Lee Tucker.

src/backend/utils/adt/datetime.c

index d04bc62531cc52a80c3f85cff7211c51cda5733a..b1dde66994260a4fc5e904c975b085300878e32d 100644 (file)
@@ -3642,7 +3642,7 @@ EncodeInterval(struct tm * tm, fsec_t fsec, int style, char *str)
                cp += strlen(cp);
        }
 
-       if (is_before && (style == USE_POSTGRES_DATES))
+       if (is_before && (style != USE_ISO_DATES))
        {
                strcat(cp, " ago");
                cp += strlen(cp);