talons

Fork of Claws Mail https://www.claws-mail
Log | Files | Refs | README | LICENSE

commit e010e3551e99fc83d183612c00ed20cf1cec41ab
parent 38131c96c146e1693fe7c4b90b4ca88d125c7a11
Author: Andrej Kacian <ticho@claws-mail.org>
Date:   Sat,  4 Feb 2017 17:35:20 +0100

Unify display of event times in vCalendar's mimeviewer on Windows and Unix.

We now use g_date_time_format() on both. Also, display
timezone abbreviation (%Z) instead of offset (%z) in the
strings.

Diffstat:
Msrc/plugins/vcalendar/vcal_manager.c | 16++--------------
1 file changed, 2 insertions(+), 14 deletions(-)

diff --git a/src/plugins/vcalendar/vcal_manager.c b/src/plugins/vcalendar/vcal_manager.c @@ -790,28 +790,16 @@ VCalEvent * vcal_manager_new_event (const gchar *uid, if (dtend && *(dtend)) { time_t tmp = icaltime_as_timet((icaltime_from_string(dtend))); -#ifdef G_OS_WIN32 GDateTime *dt = g_date_time_new_from_unix_local(tmp); - event->end = g_date_time_format(dt, "%a, %e %b %Y %H:%M:%S %z"); + event->end = g_date_time_format(dt, "%a, %e %b %Y %H:%M:%S %Z"); g_date_time_unref(dt); -#else - gchar buft[512]; - tzset(); - event->end = g_strdup(ctime_r(&tmp, buft)); -#endif } if (dtstart && *(dtstart)) { time_t tmp = icaltime_as_timet((icaltime_from_string(dtstart))); -#ifdef G_OS_WIN32 GDateTime *dt = g_date_time_new_from_unix_local(tmp); - event->start = g_date_time_format(dt, "%a, %e %b %Y %H:%M:%S %z"); + event->start = g_date_time_format(dt, "%a, %e %b %Y %H:%M:%S %Z"); g_date_time_unref(dt); -#else - gchar buft[512]; - tzset(); - event->start = g_strdup(ctime_r(&tmp, buft)); -#endif } event->dtstart = g_strdup(dtstart?dtstart:""); event->dtend = g_strdup(dtend?dtend:"");