mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-09-27 17:52:58 +02:00
i * glib/gtimer.c (g_time_val_to_iso8601): Pass a time_t* to gmtime().
Pointed out by Matthias Drochner. svn path=/trunk/; revision=7840
This commit is contained in:
@@ -1,3 +1,10 @@
|
|||||||
|
2009-01-31 Matthias Clasen <mclasen@redhat.com>
|
||||||
|
|
||||||
|
Bug 569105 – g_time_val_to_iso8601() assumes time_t==long
|
||||||
|
|
||||||
|
* glib/gtimer.c (g_time_val_to_iso8601): Pass a time_t* to gmtime().
|
||||||
|
Pointed out by Matthias Drochner.
|
||||||
|
|
||||||
2009-01-27 Christian Persch <chpe@gnome.org>
|
2009-01-27 Christian Persch <chpe@gnome.org>
|
||||||
|
|
||||||
* configure.in:
|
* configure.in:
|
||||||
|
@@ -419,19 +419,18 @@ g_time_val_to_iso8601 (GTimeVal *time_)
|
|||||||
#ifdef HAVE_GMTIME_R
|
#ifdef HAVE_GMTIME_R
|
||||||
struct tm tm_;
|
struct tm tm_;
|
||||||
#endif
|
#endif
|
||||||
|
time_t secs;
|
||||||
|
|
||||||
g_return_val_if_fail (time_->tv_usec >= 0 && time_->tv_usec < G_USEC_PER_SEC, NULL);
|
g_return_val_if_fail (time_->tv_usec >= 0 && time_->tv_usec < G_USEC_PER_SEC, NULL);
|
||||||
|
|
||||||
|
secs = time_->tv_sec;
|
||||||
#ifdef _WIN32
|
#ifdef _WIN32
|
||||||
{
|
tm = gmtime (&secs);
|
||||||
time_t secs = time_->tv_sec;
|
|
||||||
tm = gmtime (&secs);
|
|
||||||
}
|
|
||||||
#else
|
#else
|
||||||
#ifdef HAVE_GMTIME_R
|
#ifdef HAVE_GMTIME_R
|
||||||
tm = gmtime_r (&time_->tv_sec, &tm_);
|
tm = gmtime_r (&secs, &tm_);
|
||||||
#else
|
#else
|
||||||
tm = gmtime (&time_->tv_sec);
|
tm = gmtime (&secs);
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user