gdatetime values out of range

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



is it normal that if i pass values out of range to function g_date_time_new_local it returns a valida date?

glib 2.50.3 debian sid

try this code: it returns 2017-03-02, instead i expected NULL


#include <glib.h>

int
main (int argc, char *argv[])
{
	GDateTime *gdt;
	gchar *str;

	gdt = g_date_time_new_local (2017,
	                             2,
	                             30,
	                             0,
	                             0,
	                             0.0);

	str = g_date_time_format (gdt, "%F");

	g_message ("%s", str);

	return 0;
}

_______________________________________________
gtk-list mailing list
gtk-list@xxxxxxxxx
https://mail.gnome.org/mailman/listinfo/gtk-list



[Index of Archives]     [Touch Screen Library]     [GIMP Users]     [Gnome]     [KDE]     [Yosemite News]     [Steve's Art]

  Powered by Linux