Maurice van der Pot wrote:
On Mon, Jul 07, 2008 at 04:35:16PM +0400, Евгений Косов wrote:t2 = -1It looks like your system has no knowledge of a UTC timezone. Does /usr/share/zoneinfo/UTC exist on your system?
Thanks a lot. Now it works.
P.S: The changes I made:
--- mrp-time.c-orig 2008-07-07 19:11:06.000000000 +0400
+++ mrp-time.c 2008-07-07 19:11:54.000000000 +0400
@@ -164,28 +164,10 @@
mrptime
mrp_time_from_tm (struct tm *tm)
{
- gchar *old_tz;
- gchar *tmp;
mrptime t;
- /* This is a hack. Set the timezone to UTC temporarily. */
- old_tz = g_strdup (g_getenv ("TZ"));
- g_setenv ("TZ", "UTC", TRUE);
-
- tm->tm_isdst = 0;
- t = mktime (tm);
-
- /* And set it back. */
- if (old_tz != NULL && old_tz[0] != '\0') {
- tmp = g_strconcat ("TZ=", old_tz, NULL);
- putenv (tmp);
- g_free (tmp);
- } else {
- g_unsetenv ("TZ");
- }
+ t = timegm(tm);
- g_free (old_tz);
-
return t;
}
--
BR,
Evgeniy Kosov.
Attachment:
smime.p7s
Description: S/MIME Cryptographic Signature