g_time_zone under windows

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



i didn't understand how g_time_zone works under windows

if i call g_date_time_new_now_local i get greenwich time (for me 1 hour behind, and today 2 hours because in daylight saving)

try this little test


GTimeZone *tz;

tz = g_time_zone_new (NULL);
g_printf ("g_date_time_new_now %s\n", g_date_time_format (g_date_time_new_now (tz), "%F %H:%M:%S"));

tz = g_time_zone_new ("W. Europe Standard Time");
g_printf ("g_date_time_new_now \"W. Europe Standard Time\" %s\n", g_date_time_format (g_date_time_new_now (tz), "%F %H:%M:%S"));

g_printf ("g_date_time_new_now_local %s\n", g_date_time_format (g_date_time_new_now_local (), "%F %H:%M:%S"));


if i set TZ environment variable to "+01:00" i get the right time, but only when not in daylight saving


i'm using glib 2.32.1; ASAP i'll try most recent version


thanks in advance

_______________________________________________
gtk-list mailing list
gtk-list@xxxxxxxxx
https://mail.gnome.org/mailman/listinfo/gtk-list




[Index of Archives]     [Touch Screen Library]     [GIMP Users]     [Gnome]     [KDE]     [Yosemite News]     [Steve's Art]

  Powered by Linux