Handle the 'Z' parameter to the ISO date format to convert from GMT time.
1999-07-19 Matt Martin <matt@abacusnet.net> * timeutil.c (time_from_isodate): Handle the 'Z' parameter to the ISO date format to convert from GMT time. svn path=/trunk/; revision=1030
This commit is contained in:
committed by
Arturo Espinosa
parent
19e315ed06
commit
bfc53ad061
@ -1,3 +1,8 @@
|
||||
1999-07-19 Matt Martin <matt@abacusnet.net>
|
||||
|
||||
* timeutil.c (time_from_isodate): Handle the 'Z' parameter to the
|
||||
ISO date format to convert from GMT time.
|
||||
|
||||
1999-07-17 Nat Friedman <nat@gnome-support.com>
|
||||
|
||||
* calendar.c (calendar_add_object): Copy the new UID into the
|
||||
|
||||
@ -7,6 +7,10 @@ BUGS:
|
||||
- X-fields (extensions) are stripped from a vCal file when it is
|
||||
saved. They should be preserved.
|
||||
|
||||
Features:
|
||||
|
||||
- Add a calendar-week so that people know which week of the year it is
|
||||
|
||||
Year view:
|
||||
|
||||
- See why it is so fucking slow when opening its notebook page for the
|
||||
|
||||
@ -18,6 +18,9 @@ time_from_isodate (char *str)
|
||||
struct tm my_tm;
|
||||
time_t t;
|
||||
|
||||
if (strlen (str) < 14)
|
||||
return -1;
|
||||
|
||||
my_tm.tm_year = (digit_at (str, 0) * 1000 + digit_at (str, 1) * 100 +
|
||||
digit_at (str, 2) * 10 + digit_at (str, 3)) - 1900;
|
||||
|
||||
@ -29,6 +32,10 @@ time_from_isodate (char *str)
|
||||
my_tm.tm_isdst = -1;
|
||||
|
||||
t = mktime (&my_tm);
|
||||
|
||||
if (str [15] == 'Z')
|
||||
t -= timezone;
|
||||
|
||||
return t;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user