GNOME Bugzilla – Bug 638666
[gstdatetime] GMT offset fails with GDateTime backend
Last modified: 2011-10-29 15:36:30 UTC
When using GDateTime from glib on macosx, gstdatetime fails to handle properly the gmt offset: Running suite(s): GstDateTime 72%: Checks: 11, Failures: 3, Errors: 0 gst/gstdatetime.c:278:F:general:test_GstDateTime_get_utc_offset:0: 'ts' (0) is not equal to 'tm.tm_gmtoff / 3600.0' (1) gst/gstdatetime.c:75:F:general:test_GstDateTime_new_from_unix_epoch_local_time:0: 'gst_date_time_get_hour (dt)' (15) is not equal to 'tm.tm_hour' (16) gst/gstdatetime.c:50:F:general:test_GstDateTime_now:0: 'gst_date_time_get_hour (dt)' (15) is not equal to 'tm.tm_hour' (16) FAIL: gst/gstdatetime Looking at the glib docs doesn't show any fixes. I propose to disable the GDateTime backend for GstDateTime for this coming release and make it use our internal version.
Is there a bug against GLib for this already? If not please create one and add it as dependency of this bug
I get the exact same thing on x86_64 Linux. Running suite(s): GstDateTime 72%: Checks: 11, Failures: 3, Errors: 0 gst/gstdatetime.c:278:F:general:test_GstDateTime_get_utc_offset:0: 'ts' (0) is not equal to 'tm.tm_gmtoff / 3600.0' (2) gst/gstdatetime.c:75:F:general:test_GstDateTime_new_from_unix_epoch_local_time:0: 'gst_date_time_get_hour (dt)' (10) is not equal to 'tm.tm_hour' (12) gst/gstdatetime.c:50:F:general:test_GstDateTime_now:0: 'gst_date_time_get_hour (dt)' (10) is not equal to 'tm.tm_hour' (12) Tested with glib 2.26.1 and 2.27.91 But it does not happen on 32-bit (i386) with otherwise exactly the same versions of userland libs/apps.
Kaj-Michael, What version of gstreamer is that ? What distro are you running ? What is your real timezone offset ? What's the output of 'date' ?
0.10.31 (I've also tried 0.10.31.3) Distro: my own Timezone: Europe/Helsinki (GMT+2) Date: Thu Jan 13 14:10:45 EET 2011
I presume this still happens with 0.10.32? Maybe you could investigate this a little? e.g. $ cd gstreamer-0.10.32/tests/check $ GST_CHECKS=test_GstDateTime_now make gst/gstdatetime.gdb (gdb) break test_GstDateTime_now (gdb) run ... (gdb) n .... and then step through it one-by-one, and print the various structs (struct tm and the date time struct) along the way, to see what happens and what values get returned?
any news for this report?
An update of /etc/localtime fixed this for me.
closing the bug as per comment#7