@ -501,8 +501,12 @@ dttofmtasc_replace(timestamp * ts, date dDate, int dow, struct tm * tm,
* 4 - digit year corresponding to the ISO week number .
* 4 - digit year corresponding to the ISO week number .
*/
*/
case ' G ' :
case ' G ' :
{
/* Keep compiler quiet - Don't use a literal format */
const char * fmt = " %G " ;
tm - > tm_mon - = 1 ;
tm - > tm_mon - = 1 ;
i = strftime ( q , * pstr_len , " %G " , tm ) ;
i = strftime ( q , * pstr_len , fmt , tm ) ;
if ( i = = 0 )
if ( i = = 0 )
return - 1 ;
return - 1 ;
while ( * q )
while ( * q )
@ -512,6 +516,7 @@ dttofmtasc_replace(timestamp * ts, date dDate, int dow, struct tm * tm,
}
}
tm - > tm_mon + = 1 ;
tm - > tm_mon + = 1 ;
replace_type = PGTYPES_TYPE_NOTHING ;
replace_type = PGTYPES_TYPE_NOTHING ;
}
break ;
break ;
/*
/*
@ -682,7 +687,11 @@ dttofmtasc_replace(timestamp * ts, date dDate, int dow, struct tm * tm,
* decimal number .
* decimal number .
*/
*/
case ' V ' :
case ' V ' :
i = strftime ( q , * pstr_len , " %V " , tm ) ;
{
/* Keep compiler quiet - Don't use a literal format */
const char * fmt = " %V " ;
i = strftime ( q , * pstr_len , fmt , tm ) ;
if ( i = = 0 )
if ( i = = 0 )
return - 1 ;
return - 1 ;
while ( * q )
while ( * q )
@ -691,6 +700,7 @@ dttofmtasc_replace(timestamp * ts, date dDate, int dow, struct tm * tm,
( * pstr_len ) - - ;
( * pstr_len ) - - ;
}
}
replace_type = PGTYPES_TYPE_NOTHING ;
replace_type = PGTYPES_TYPE_NOTHING ;
}
break ;
break ;
/*
/*