aboutsummaryrefslogtreecommitdiffstats
path: root/libical/src
diff options
context:
space:
mode:
authorFederico Mena Quintero <federico@helixcode.com>2000-12-14 12:40:22 +0800
committerFederico Mena Quintero <federico@src.gnome.org>2000-12-14 12:40:22 +0800
commitdb80f3f3abe8beef6ff4e520f9d12c9d40679708 (patch)
tree5b6889e8c7a9f6cd86d0158f648165710b965a4b /libical/src
parent8bee19374da063f3600d3eb31cc9ec377392bef1 (diff)
downloadgsoc2013-evolution-db80f3f3abe8beef6ff4e520f9d12c9d40679708.tar.gz
gsoc2013-evolution-db80f3f3abe8beef6ff4e520f9d12c9d40679708.tar.zst
gsoc2013-evolution-db80f3f3abe8beef6ff4e520f9d12c9d40679708.zip
time_t values *are* in UTC by definition, so the is_utc argument is
2000-12-13 Federico Mena Quintero <federico@helixcode.com> * src/libical/icaltime.c (icaltime_from_timet): time_t values *are* in UTC by definition, so the is_utc argument is useless. Removed the conversion to UTC and made the icaltimetype.is_utc be TRUE always. This breaks libical's owne internal use of this function, but since we do not use any of the functions that use it that way, we can ignore this. This is basically a temporary measure until libical does the right thing. svn path=/trunk/; revision=6994
Diffstat (limited to 'libical/src')
-rw-r--r--libical/src/libical/icaltime.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/libical/src/libical/icaltime.c b/libical/src/libical/icaltime.c
index 3a762a73f9..946a0115e9 100644
--- a/libical/src/libical/icaltime.c
+++ b/libical/src/libical/icaltime.c
@@ -39,9 +39,11 @@ icaltime_from_timet(time_t tm, int is_date, int is_utc)
struct icaltimetype tt;
struct tm t;
+#if 0 /* This is incorrect; a time_t *is* in UTC by definition. So we just ignore the flag. */
if(is_utc == 0){
tm += icaltime_local_utc_offset();
}
+#endif
t = *(localtime(&tm));
@@ -52,7 +54,10 @@ icaltime_from_timet(time_t tm, int is_date, int is_utc)
tt.month = t.tm_mon + 1;
tt.year = t.tm_year+ 1900;
+#if 0
tt.is_utc = is_utc;
+#endif
+ tt.is_utc = 1;
tt.is_date = is_date;
return tt;