aboutsummaryrefslogtreecommitdiffstats
path: root/calendar/cal-util/timeutil.c
diff options
context:
space:
mode:
Diffstat (limited to 'calendar/cal-util/timeutil.c')
-rw-r--r--calendar/cal-util/timeutil.c17
1 files changed, 7 insertions, 10 deletions
diff --git a/calendar/cal-util/timeutil.c b/calendar/cal-util/timeutil.c
index 07936950c0..3bb254dbf7 100644
--- a/calendar/cal-util/timeutil.c
+++ b/calendar/cal-util/timeutil.c
@@ -11,6 +11,7 @@
#include <string.h>
#include <ctype.h>
#include <glib.h>
+#include <ical.h>
#include "timeutil.h"
@@ -39,8 +40,8 @@ isodate_from_time_t (time_t t)
struct tm *tm;
char isotime[40];
- tm = localtime (&t);
- strftime (isotime, sizeof (isotime)-1, "%Y%m%dT%H%M%S", tm);
+ tm = gmtime (&t);
+ strftime (isotime, sizeof (isotime)-1, "%Y%m%dT%H%M%SZ", tm);
return g_strdup (isotime);
}
@@ -51,6 +52,7 @@ isodate_from_time_t (time_t t)
* Converts an ISO 8601 time string into a time_t value.
*
* Return value: Time_t corresponding to the specified ISO string.
+ * Note that we only allow UTC times at present.
**/
time_t
time_from_isodate (const char *str)
@@ -59,6 +61,7 @@ time_from_isodate (const char *str)
struct tm my_tm;
time_t t;
int i;
+ char *old_tz;
g_return_val_if_fail (str != NULL, -1);
@@ -93,16 +96,10 @@ time_from_isodate (const char *str)
my_tm.tm_isdst = -1;
+ old_tz = set_tz ("UTC");
t = mktime (&my_tm);
+ unset_tz (old_tz);
- if (len == 16) {
-#if defined(HAVE_TM_GMTOFF)
- t += my_tm.tm_gmtoff;
-#elif defined(HAVE_TIMEZONE)
- t -= timezone;
-#endif
- }
-
return t;
}
n>1-0/+4 * i2001-07-02 Larry Ewing <lewing@ximian.com>Larry Ewing2001-07-031-0/+4 * Check for libGal 0.8.99.7.Jeffrey Stedfast2001-07-031-0/+4 * s,AC_DEFINE,AC_DEFINE_UNQUOTED to make these not totally useless.Peter Williams2001-07-021-0/+5 * Build the composer after the addressbook, as it needs some CORBA stuffEttore Perazzoli2001-07-021-0/+5 * Added evolution-alarm-notify.Federico Mena Quintero2001-07-011-0/+4 * Require GAL 0.8.99.6.Ettore Perazzoli2001-06-301-0/+4 * Adding `camel/tests/mime-filter/Makefile' to the `AC_OUTPUT()' list inEttore Perazzoli2001-06-291-0/+5 * Bump required gal version for new accessors in ETree.Peter Williams2001-06-281-0/+5 * add addressbook/gui/contact-list-editor, and correct path ofChris Toshok2001-06-251-0/+5 * added new directory for the libwombat library, which will contain theRodrigo Moya2001-06-211-0/+18 * Moved my entires to doc/ChangeLog per request of danwKevin Breit2001-06-211-37/+0 * Fix the OpenLDAP check to default to "no" if you don't specify anything.Dan Winship2001-06-211-0/+5 * Updated for new UI.Kevin Breit2001-06-211-0/+4 * Reworded a little bit for more descrip.Kevin Breit2001-06-211-0/+4 * Documented categorizing an event.Kevin Breit2001-06-211-0/+4 * Updated Bcc: exampleKevin Breit2001-06-201-0/+4 * Change --enable-ldap to --with-openldap, allow a path prefix as anDan Winship2001-06-201-0/+6 * Took out a reference to gloss.Kevin Breit2001-06-201-0/+4 * Made it build.Kevin Breit2001-06-201-0/+4 * Tweak the db3 header check to like our RH7 build machine again.Dan Winship2001-06-201-0/+5 * Basic editsKevin Breit2001-06-201-0/+4 * Updated to say "My Evolution"Kevin Breit2001-06-201-0/+4 * Added definition.Kevin Breit2001-06-201-4/+5 * Sync - FedericoFederico Mena Quintero2001-06-201-0/+4 * Changed buf to an int here. (lexGetQuotedPrintable): Changed cur to an intChristopher James Lahey2001-06-201-0/+5 * Add #defines for the current supported db3 version so that when we changeDan Winship2001-06-191-0/+3 * Add "--with-db3" to fill in both --with-db3-includes and --with-db3-libs.Dan Winship2001-06-191-0/+7 * Check the modes on $system_mail_dir and set up variables forDan Winship2001-06-191-0/+6 * One slight db3 check correctionJP Rosevear2001-06-121-2/+6 * fix typo in -ldb3 check.Chris Toshok2001-06-121-0/+4 * Update db3 configure checks for RedHat. /me beats a sleep cat to deathJP Rosevear2001-06-121-0/+5 * Bumped required version of gal to 0.8.99.2.Christopher James Lahey2001-06-091-0/+4 * Added addressbook/gui/merging/Makefile.Christopher James Lahey2001-06-091-0/+4 * builddir != srcdir fix.Jacob Leach2001-06-091-0/+4 * Committing the new My Evolution.Iain Holmes2001-06-091-0/+7 * Vanity, thy name is trow.Jon Trowbridge2001-06-091-0/+4 * Bump version to 0.10.99JP Rosevear2001-06-061-0/+4 * Included information about db3.Christopher James Lahey2001-06-011-0/+11 * Use --moddatadir to derive this.Christopher James Lahey2001-06-011-0/+4 * Bump gal dependency to 0.8.99.1Dan Winship2001-05-311-0/+4 * update version requirementsJP Rosevear2001-05-301-0/+4 * Remove reference to verify-evolution-install.sh since it doesn't work anyDan Winship2001-05-241-0/+10 * s/evolution-vcard-import/evolution-vcard-importerKjartan Maraas2001-05-231-0/+4 * Create MAILER_CFLAGS and MAILER_LIBS so that we don't have the same libsJeffrey Stedfast2001-05-231-0/+6 * Add in evolution-vcard-importer as part of the list of processes toDuncan Mak2001-05-211-0/+5 * Return the serialized EDestinations (rather than just a string w/ e-mailJon Trowbridge2001-05-181-0/+5 * Create CAMEL_CFLAGS and CAMEL_LIBS so that we don't have to link in allJeffrey Stedfast2001-05-161-0/+6 * add the importers.Chris Toshok2001-05-151-0/+4 * added file for ScrollkeeperKevin Breit2001-05-151-0/+4 * add the nspr includes to the list of includes used to test for NSSChris Toshok2001-05-101-0/+6 * Kill the RDF Summary as well.Iain Holmes2001-05-101-0/+5 * OpenSSL LDFLAGS also needs to include -lcryptJeffrey Stedfast2001-05-101-0/+4 * Importer changesIain Holmes2001-05-091-0/+6 * Bumped check for gal to 0.7.99.3.Christopher James Lahey2001-05-081-0/+4 * undef HAVE_SSL and HAVE_OPENSSLJeffrey Stedfast2001-05-081-0/+6 * upped required gtkhtml version to 0.9.3, even that is not enough for idlGediminas Paulauskas2001-05-061-0/+7 * Merge fix from the 0.10 branch:Ettore Perazzoli2001-04-271-0/+6 * Check for gethostbyname_r so e_gethostbyname_r will DTRT.Dan Winship2001-04-271-0/+3 * We no longer depend on libunicode.Dan Winship2001-04-271-0/+8 * Bump up the gal requirementDan Winship2001-04-251-0/+4 * Documentation building fixes merged from the evolution-0-10-branch:Ettore Perazzoli2001-04-241-0/+7 * We need to link in more than just libnspr4, we also need libpthread.Jeffrey Stedfast2001-04-231-0/+6 * Added in "compose-messages.png" in the Makefile of evolution/artDuncan Mak2001-04-221-0/+4 * Merge fix from the 0.10 branch:Ettore Perazzoli2001-04-171-0/+5 * Pull up fix from the branch:Ettore Perazzoli2001-04-161-0/+6 * Updated the required version of gal to 0.6.99.0.Christopher James Lahey2001-04-131-0/+4 * Check if gethostbyname_r take five paramsJP Rosevear2001-04-121-0/+6 * i18n fixes, added missing includes.Gediminas Paulauskas2001-04-111-0/+6 * create the makefile in camel/tests/smimeJeffrey Stedfast2001-04-101-0/+5 * add some more 16 character versions for freebsd.Chris Toshok2001-04-091-0/+5 * Brag.Kjartan Maraas2001-04-051-0/+4 * Executive summary and Trash now have nice icons both in tree/folder title andGediminas Paulauskas2001-04-041-0/+8 * Remind users that they will currently have to copy their cert databaseJeffrey Stedfast2001-04-031-0/+5 * Blessed by Ettore.Gediminas Paulauskas2001-04-021-0/+4 * Bump this to 10. (We forgot to do this before branching *again*...)Dan Winship2001-03-311-0/+5 * add a bit mentioning that if configure claims you don't have somethingDan Winship2001-03-291-0/+15 * In a burst of egomania, added myself.Jon Trowbridge2001-03-281-0/+4 * create camel/misc/MakefileRadek Doulik2001-03-261-0/+4 * Update xml-i18n-tools versionDan Winship2001-03-231-0/+4 * new menu iconsJakub Steiner2001-03-221-0/+8 * fixing checkerboardJakub Steiner2001-03-221-0/+4 * Bumped gal requirement to 0.5.99.11.Christopher James Lahey2001-03-221-0/+4 * renaming icons to make Miguel's speedups possibleJakub Steiner2001-03-221-0/+19 * Require bison, not yacc (for vcc.y)Dan Winship2001-03-221-0/+4 * Added all the new icons to the distribution.Miguel de Icaza2001-03-221-0/+5 * More fixes for NSPR and NSS checks - use fixed it to use AC_CHECK_HEADERSJeffrey Stedfast2001-03-211-0/+7 * color coded app icons and some new icons. also a new splash (probably to be r...Jakub Steiner2001-03-211-0/+20 * Fix ettore's fix ;-)Jeffrey Stedfast2001-03-201-0/+4 * Bumped gal requirement to 0.5.99.8.Christopher James Lahey2001-03-201-0/+4 * Make sure we never define `NSPR_CFLAGS' or `NSS_CFLAGS' as just "-I".Ettore Perazzoli2001-03-20