Skip to content

Commit

Permalink
fix timestamp issue #165
Browse files Browse the repository at this point in the history
  • Loading branch information
andre-doherty committed Nov 21, 2023
1 parent f7669af commit 5a4d3e0
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/common/collection.c
Original file line number Diff line number Diff line change
Expand Up @@ -1986,14 +1986,14 @@ static gchar *get_query_string(const dt_collection_properties_t property, const
if(strcmp(operator, "[]") == 0)
{
if(number1 && number2)
query = g_strdup_printf("((%s >= %ld) AND (%s <= %ld))", colname, (long int)nb1, colname, (long int)nb2);
query = g_strdup_printf("((%s >= %" G_GINT64_FORMAT ") AND (%s <= %" G_GINT64_FORMAT "))", colname, nb1, colname, nb2);
}
else if((strcmp(operator, "=") == 0 || strcmp(operator, "") == 0) && number1)
query = g_strdup_printf("((%s >= %ld) AND (%s <= %ld))", colname, (long int)nb1, colname, (long int)nb2);
else if((strcmp(operator, "=") == 0 || strcmp(operator, "") == 0) && number1 && number2)
query = g_strdup_printf("((%s >= %" G_GINT64_FORMAT ") AND (%s <= %" G_GINT64_FORMAT "))", colname, nb1, colname, nb2);
else if(strcmp(operator, "<>") == 0 && number1 && number2)
query = g_strdup_printf("((%s < %ld) AND (%s > %ld))", colname, (long int)nb1, colname, (long int)nb2);
query = g_strdup_printf("((%s < %" G_GINT64_FORMAT ") AND (%s > %" G_GINT64_FORMAT "))", colname, nb1, colname, nb2);
else if(number1)
query = g_strdup_printf("(%s %s %ld)", colname, operator, (long int)nb1);
query = g_strdup_printf("(%s %s %" G_GINT64_FORMAT ")", colname, operator, nb1);
else
query = g_strdup("1 = 1");

Expand Down

0 comments on commit 5a4d3e0

Please sign in to comment.