Bug#653196: libglib2.0-0: g_time_val_from_iso8601 doesn't handle YYYY-MM-DD dates correctly
Vincent Lefevre
vincent at vinc17.net
Sun Dec 25 00:58:42 UTC 2011
Package: libglib2.0-0
Version: 2.30.2-4
Severity: normal
g_time_val_from_iso8601 doesn't handle YYYY-MM-DD dates correctly.
For instance, when debugging Liferea with:
time_t
date_parse_ISO8601 (const gchar *date)
{
GTimeVal tv;
gboolean b;
g_warning ("Date: %s", date);
b = g_time_val_from_iso8601 (date, &tv);
if (b == TRUE) {
gchar *s;
s = g_time_val_to_iso8601 (&tv);
g_warning (" was: %s", s);
g_free (s);
}
return (time_t)tv.tv_sec;
}
I get:
** (liferea:10394): WARNING **: Date: 2011-12-24
** (liferea:10394): WARNING **: was: 1970-08-18T05:43:44Z
** (liferea:10394): WARNING **: Date: 2011-12-22
** (liferea:10394): WARNING **: was: 1970-08-18T06:35:12Z
Note: if g_time_val_from_iso8601 isn't meant to support YYYY-MM-DD
dates (the current documentation is unclear), then the returned
boolean should not be true!
-- System Information:
Debian Release: wheezy/sid
APT prefers unstable
APT policy: (500, 'unstable'), (500, 'testing'), (500, 'stable'), (1, 'experimental')
Architecture: amd64 (x86_64)
Kernel: Linux 3.1.0-1-amd64 (SMP w/2 CPU cores)
Locale: LANG=POSIX, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Versions of packages libglib2.0-0 depends on:
ii libc6 2.13-23
ii libffi5 3.0.10-3
ii libpcre3 8.12-4
ii libselinux1 2.1.0-4
ii multiarch-support 2.13-23
ii zlib1g 1:1.2.3.4.dfsg-3
Versions of packages libglib2.0-0 recommends:
ii libglib2.0-data 2.30.2-4
ii shared-mime-info 0.90-1
libglib2.0-0 suggests no packages.
-- no debconf information
More information about the pkg-gnome-maintainers
mailing list