Re: [PATCH 3/6] core: added grl_media_set_date_from_iso8601()



On 28/06/2011 09:24, Juan A. Suarez Romero wrote:
> On Wed, 2011-06-22 at 19:07 +0200, Guillaume Emont wrote:
>>  
>> +gboolean
>> +grl_media_set_date_from_iso8601 (GrlMedia *media, const gchar *date)
>> +{
>> +  GTimeVal t = { 0, }; 
> 
> 
> For me, the ideal solution would be GLib having a:
> 
> g_date_time_from_iso8601 (const gchar *iso_date, GDateTime *date_);
>
> in the same spirit as g_time_val_from_iso8601().
Would make sense, though, like for g_time_val_from_iso8601(), glib might
not want the same thing as we do for "incomplete" datetimes that do not
specify a time.

> And probably the other
> way around: g_date_time_to_iso_8601().
g_date_time_format("%FT%H:%M:%S%z") already does that.
> 
> As this is not true at this moment, I would add those functions in
> grl-util, and making the user to use it to set a date from string.
I actually need that for the caps and options stuff, and implemented it
in that branch. I think I will move it to this branch.
> 
> Thus, if we add other date keys in the future, like _PUBLISHING_DATE, or
> _RECORDING_DATE, or _MODIFIED_DATE, we do not need to add the
> corresponding _from_iso8601() functions.
Yes we do, until GDateTime is correctly handled in the
gobject-introspection stuff.
> 
> 
> 	J.A.
> 
> 
> _______________________________________________
> grilo-list mailing list
> grilo-list gnome org
> http://mail.gnome.org/mailman/listinfo/grilo-list
> 



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