[tracker] tests: Unset TZ if it wasn't set previously
- From: Carlos Garnacho <carlosg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [tracker] tests: Unset TZ if it wasn't set previously
- Date: Fri, 22 Nov 2013 16:28:53 +0000 (UTC)
commit 7e9e1027f941ff7fa3d341e73a4d29ea0b59fc11
Author: Carlos Garnacho <carlos lanedo com>
Date: Fri Nov 22 15:09:28 2013 +0100
tests: Unset TZ if it wasn't set previously
tests/libtracker-common/tracker-date-time-test.c | 4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)
---
diff --git a/tests/libtracker-common/tracker-date-time-test.c
b/tests/libtracker-common/tracker-date-time-test.c
index a4bf767..f624d80 100644
--- a/tests/libtracker-common/tracker-date-time-test.c
+++ b/tests/libtracker-common/tracker-date-time-test.c
@@ -58,9 +58,11 @@ test_string_to_date (void)
result = g_date_new ();
g_date_set_time_t (result, result_time_t);
- g_setenv ("TZ", timezone, TRUE);
if (timezone) {
+ g_setenv ("TZ", timezone, TRUE);
g_free (timezone);
+ } else {
+ g_unsetenv ("TZ");
}
g_assert_cmpint (g_date_get_year (expected), ==, g_date_get_year (result));
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]