After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 409200 - time_from_isodate() does not read ISO8601 dates
time_from_isodate() does not read ISO8601 dates
Status: RESOLVED OBSOLETE
Product: evolution-data-server
Classification: Platform
Component: Calendar
3.10.x (obsolete)
Other Linux
: Normal normal
: ---
Assigned To: evolution-calendar-maintainers
Evolution QA team
: 349770 (view as bug list)
Depends on:
Blocks: 372155
 
 
Reported: 2007-02-18 08:41 UTC by Vincent Untz
Modified: 2021-05-19 11:04 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Updated time_from_isodate() to read ISO8601 dates also (1.71 KB, patch)
2014-02-08 21:43 UTC, Parin Porecha
needs-work Details | Review

Description Vincent Untz 2007-02-18 08:41:34 UTC
The current format read by this function is yyyymmdd[Thhmmss[Z]]. This is wrong since the standard is yyyymmdd[Thh:mm:ss[Z]], and there's some timezone information.

glib 2.12 has g_time_val_from_iso8601() which should work as expected.
Comment 1 Vincent Untz 2007-05-14 12:26:59 UTC
Note that this is breaking the evolution/clock applet integration. Would be great to fix this for 2.20.
Comment 2 walt 2007-08-30 22:44:36 UTC
Just to clarify -- what I am seeing is that this command line:
#evolution calendar:///?startdate=20070830
just hangs forever and the calendar window never opens.

Is that the same problem you are reporting?
Comment 3 Vincent Untz 2007-09-02 11:35:38 UTC
I don't think that's not the same problem.
Comment 4 Vincent Untz 2008-04-07 11:50:27 UTC
Please, can we get this fixed? It's bad to have apps that will use hhmmss instead of hh:mm:ss since this means it will break in the future.
Comment 5 Parin Porecha 2014-02-08 21:43:19 UTC
Created attachment 268530 [details] [review]
Updated time_from_isodate() to read ISO8601 dates also

Please review the patch
Comment 6 Milan Crha 2014-02-25 10:55:40 UTC
Review of attachment 268530 [details] [review]:

Thanks for a patch. Apart of coding-style issues highlighted below, I see more issues with the patch:
a) the added strcpy() call can easily overflow buffer of 20 characters
b) your added code simply strips ':' from the string, which is not the same as supporting the ISO format, because you would also accept malformed strings like "20140220T1:22222", which is none of the supported formats

::: calendar/libecal/e-cal-time-util.c
@@ +620,3 @@
+	/* iso_str = yyyymmdd[Thh:mm:ss[Z]] */
+
+	if (strchr(iso_str, ':')) {

coding-style: missing space after 'strchr'

@@ +628,3 @@
+		str[j] = 0;
+	}
+	else

coding-style: else belongs on the same line as the closing bracket
Comment 7 Milan Crha 2017-08-24 16:06:28 UTC
*** Bug 349770 has been marked as a duplicate of this bug. ***
Comment 8 Milan Crha 2017-08-24 16:19:46 UTC
According to [1], the time can be with and without ':'. And the seconds cannot be skipped (that's for bug #349770).

From my point of view, the naming of the function is not ideal. It's rather meant to be able to read what isodate_from_time_t() produces. It doesn't conform with iso date/time generated by libical functions, to name one.

The g_time_val_from_iso8601() also doesn't cover whole ISO 8601.

I tend to WontFix this.

[1] http://support.sas.com/documentation/cdl/en/lrdict/64316/HTML/default/viewer.htm#a003169814.htm
Comment 9 André Klapper 2021-05-19 11:04:04 UTC
GNOME is going to shut down bugzilla.gnome.org in favor of gitlab.gnome.org. 
As part of that, we are mass-closing older open tickets in bugzilla.gnome.org which have not seen updates for a longer time (resources are unfortunately quite limited so not every ticket can get handled).

If you can still reproduce the situation described in this ticket in a recent and supported software version, then please follow
  https://wiki.gnome.org/Community/GettingInTouch/BugReportingGuidelines
and create a new ticket at
  https://gitlab.gnome.org/GNOME/evolution-data-server/-/issues/

Thank you for your understanding and your help.