Revision b70b97a243f7c2ea09a22b433f1586b326363de2

nwalp at pidgin.im nwalp at pidgin.im
Sat Apr 7 00:44:05 EDT 2007


o   -----------------------------------------------------------------
|   Revision: b70b97a243f7c2ea09a22b433f1586b326363de2
|   Ancestor: fce78c56547824b0f613f2a8cf9c4bf92e24957d
|   Author: nwalp at pidgin.im
|   Date: 2007-04-07T04:43:50
|   Branch: im.pidgin.pidgin
|   
|   Modified files:
|           libpurple/tests/test_util.c libpurple/util.c
|   
|   ChangeLog: 
|   
|   fix our string-to-time function, and add a couple tests for it
|   
|   ============================================================
|   --- libpurple/tests/test_util.c	f2c4e35bf2eaced2d1b6e2402d45124690da2673
|   +++ libpurple/tests/test_util.c	c05c0df6789e2520a3d145080d2eebf76afec7c6
|   @@ -74,6 +74,13 @@ END_TEST
|    }
|    END_TEST
|    
|   +START_TEST(test_util_str_to_time)
|   +{
|   +	fail_unless(377185800 == purple_str_to_time("19811214T12:50:00", TRUE, NULL, NULL, NULL));
|   +	fail_unless(1175919261 == purple_str_to_time("20070407T04:14:21", TRUE, NULL, NULL, NULL));
|   +}
|   +END_TEST
|   +
|    Suite *
|    util_suite(void)
|    {
|   @@ -102,5 +109,9 @@ util_suite(void)
|    	tcase_add_test(tc, test_util_email_is_valid);
|    	suite_add_tcase(s, tc);
|    
|   +	tc = tcase_create("Time");
|   +	tcase_add_test(tc, test_util_str_to_time);
|   +	suite_add_tcase(s, tc);
|   +
|    	return s;
|    }
|   ============================================================
|   --- libpurple/util.c	cf4f13c6c87871f8436bafe3b7473f30ca09ce6e
|   +++ libpurple/util.c	11197742ee3ec3d2ce8ee8a764622da1ca392f8b
|   @@ -794,7 +794,7 @@ purple_str_to_time(const char *timestamp
|    			}
|    			else if (utc)
|    			{
|   -				t->tm_isdst = 0;
|   +				t->tm_isdst = -1;
|    			}
|    
|    			if (rest != NULL && *c != '\0')

To get the patch for this revision, please do this:
mtn log --last 1 --diffs --from b70b97a243f7c2ea09a22b433f1586b326363de2


More information about the Commits mailing list