changeset 23367:ef4dbd2bb696

Allow a 'Z' (UTC) TZ in strings passed to purple_str_to_time. Used for parsing (some) MSN SOAP timestamps. Plucked from im.pidgin.cpw.qulogic.msn, approved by rlaager, applied changes from 738e1d83d6a690135e101c9612aee628c1b65601 through cc1fdbd7d5ce3915a5d7ad6920066f5951a29e23
author Elliott Sales de Andrade <qulogic@pidgin.im>
date Sat, 14 Jun 2008 04:50:35 +0000
parents 05802d915c13
children 98594354b423 f85450504940
files libpurple/util.c
diffstat 1 files changed, 5 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/libpurple/util.c	Sat Jun 14 03:20:19 2008 +0000
+++ b/libpurple/util.c	Sat Jun 14 04:50:35 2008 +0000
@@ -832,6 +832,11 @@
 				if (offset_positive)
 					tzoff *= -1;
 			}
+			else if ((*c == 'Z') && (c = c + 1))
+			{
+				/* 'Z' = Zulu = UTC */
+				tzoff = 0;
+			}
 			else if (utc)
 			{
 				static struct tm tmptm;