mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-03-15 20:25:12 +01:00
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
This commit is contained in:
parent
bcdc09e641
commit
bb123b85cf
@ -1,3 +1,9 @@
|
||||
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,
|
||||
|
Loading…
x
Reference in New Issue
Block a user