time_from_isodate should not require seconds to be specified

Bug #35115 reported by Tollef Fog Heen
6
Affects Status Importance Assigned to Milestone
evolution-data-server
Invalid
Wishlist
evolution-data-server (Ubuntu)
Triaged
Wishlist
Ubuntu Desktop Bugs

Bug Description

From the description of time_from_isodate:

 * time_from_isodate:
 * @str: Date/time value in ISO 8601 format.
 *
 * Converts an ISO 8601 UTC time string into a time_t value.

However, it doesn't handle times, only dates:

With
#include <stdio.h>
#include <libecal/e-cal-time-util.h>

int main(int argc, char **argv) {
    printf("%d %s\n", time_from_isodate(argv[1]), argv[1]);
}

as our sample program, compiled using:

$ gcc $(pkg-config --libs --cflags libecal-1.2) test.c -o testt

We then get:

: tfheen@thosu /tmp > ./testt 20050601T010
-1 20050601T010
: tfheen@thosu /tmp > ./testt 20050601T010Z
-1 20050601T010Z
: tfheen@thosu /tmp >

Revision history for this message
Tollef Fog Heen (tfheen) wrote :

Actually, this bug is bogus, since I forgot to include the seconds.

I think that time_from_isodate should be better at parsing the input, though and not require seconds.

Revision history for this message
Sebastien Bacher (seb128) wrote :

I've forwarded that upstream as a feature request, I would not be surprised if they reject it though since they have already a lot of work on real bugs for the moment and that doesn't look at really feature since it's easy enough to use the full format: http://bugzilla.gnome.org/show_bug.cgi?id=349770

Changed in evolution-data-server:
assignee: nobody → desktop-bugs
status: Unconfirmed → Confirmed
Changed in evolution-data-server:
status: Unknown → Unconfirmed
Changed in evolution-data-server:
status: Confirmed → Triaged
Changed in evolution-data-server:
importance: Unknown → Wishlist
Changed in evolution-data-server:
status: New → Invalid
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.