mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2024-12-27 07:56:14 +01:00
tests/gdatetime: Use a real rather than invented timezone
The tzdata maintainers had previously invented abbreviations for timezones. As of their 2017a release, the one we were testing ("BRT") has been dropped. Switch to testing PST, which is a real timezone abbreviation. https://bugzilla.gnome.org/show_bug.cgi?id=779799
This commit is contained in:
parent
567f01044f
commit
ec02a1875f
@ -635,22 +635,22 @@ test_GDateTime_new_full (void)
|
||||
g_date_time_unref (dt);
|
||||
|
||||
#ifdef G_OS_UNIX
|
||||
tz = g_time_zone_new ("America/Recife");
|
||||
tz = g_time_zone_new ("America/Tijuana");
|
||||
#elif defined G_OS_WIN32
|
||||
tz = g_time_zone_new ("E. South America Standard Time");
|
||||
tz = g_time_zone_new ("Pacific Standard Time");
|
||||
#endif
|
||||
dt = g_date_time_new (tz, 2010, 5, 24, 8, 4, 0);
|
||||
dt = g_date_time_new (tz, 2010, 11, 24, 8, 4, 0);
|
||||
g_time_zone_unref (tz);
|
||||
g_assert_cmpint (2010, ==, g_date_time_get_year (dt));
|
||||
g_assert_cmpint (5, ==, g_date_time_get_month (dt));
|
||||
g_assert_cmpint (11, ==, g_date_time_get_month (dt));
|
||||
g_assert_cmpint (24, ==, g_date_time_get_day_of_month (dt));
|
||||
g_assert_cmpint (8, ==, g_date_time_get_hour (dt));
|
||||
g_assert_cmpint (4, ==, g_date_time_get_minute (dt));
|
||||
g_assert_cmpint (0, ==, g_date_time_get_second (dt));
|
||||
#ifdef G_OS_UNIX
|
||||
g_assert_cmpstr ("BRT", ==, g_date_time_get_timezone_abbreviation (dt));
|
||||
g_assert_cmpstr ("PST", ==, g_date_time_get_timezone_abbreviation (dt));
|
||||
#elif defined G_OS_WIN32
|
||||
g_assert_cmpstr ("E. South America Standard Time", ==,
|
||||
g_assert_cmpstr ("Pacific Standard Time", ==,
|
||||
g_date_time_get_timezone_abbreviation (dt));
|
||||
#endif
|
||||
g_assert (!g_date_time_is_daylight_savings (dt));
|
||||
|
Loading…
Reference in New Issue
Block a user