Commit bb123b85 authored by Emmanuele Bassi's avatar Emmanuele Bassi Committed by Emmanuele Bassi

Use the right format string to get leading zeros when converting to ISO

2008-07-21  Emmanuele Bassi  <ebassi@gnome.org>

	* glib/gtimer.c (g_time_val_to_iso8601): Use the right format
	string to get leading zeros when converting to ISO 8601. (Sven
	Herzberg)

svn path=/trunk/; revision=7232
parent bcdc09e6
2008-07-21 Emmanuele Bassi <ebassi@gnome.org>
* glib/gtimer.c (g_time_val_to_iso8601): Use the right format
string to get leading zeros when converting to ISO 8601. (Sven
Herzberg)
2008-07-21 Emmanuele Bassi <ebassi@gnome.org>
* glib/gbookmarkfile.c:
......
......@@ -433,7 +433,7 @@ g_time_val_to_iso8601 (GTimeVal *time_)
/* ISO 8601 date and time format, with fractionary seconds:
* YYYY-MM-DDTHH:MM:SS.MMMMMMZ
*/
retval = g_strdup_printf ("%d-%d-%dT%d:%d:%d.%06ldZ",
retval = g_strdup_printf ("%4d-%02d-%02dT%02d:%02d:%02d.%06ldZ",
tm->tm_year + 1900,
tm->tm_mon + 1,
tm->tm_mday,
......@@ -447,7 +447,7 @@ g_time_val_to_iso8601 (GTimeVal *time_)
/* ISO 8601 date and time format:
* YYYY-MM-DDTHH:MM:SSZ
*/
retval = g_strdup_printf ("%d-%d-%dT%d:%d:%dZ",
retval = g_strdup_printf ("%4d-%02d-%02dT%02d:%02d:%02dZ",
tm->tm_year + 1900,
tm->tm_mon + 1,
tm->tm_mday,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment