Skip to content

Commit

Permalink
Remove unused gnc_timezone function.
Browse files Browse the repository at this point in the history
  • Loading branch information
jralls committed May 4, 2015
1 parent f4451ff commit e1e4391
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 40 deletions.
27 changes: 0 additions & 27 deletions src/libqof/qof/gnc-date.cpp
Expand Up @@ -1316,33 +1316,6 @@ gnc_dmy2timespec_end (int day, int month, int year)

/********************************************************************\
\********************************************************************/

long int
gnc_timezone (const struct tm *tm)
{
g_return_val_if_fail (tm != NULL, 0);

#ifdef HAVE_STRUCT_TM_GMTOFF
/* tm_gmtoff is seconds *east* of UTC and is
* already adjusted for daylight savings time. */
return -(tm->tm_gmtoff);
#else
{
long tz_seconds;
/* timezone is seconds *west* of UTC and is
* not adjusted for daylight savings time.
* In Spring, we spring forward, wheee! */
# if COMPILER(MSVC)
_get_timezone(&tz_seconds);
# else
tz_seconds = timezone;
# endif
return (long int)(tz_seconds - (tm->tm_isdst > 0 ? 3600 : 0));
}
#endif
}


void
timespecFromTime64 ( Timespec *ts, time64 t )
{
Expand Down
13 changes: 0 additions & 13 deletions src/libqof/qof/gnc-date.h
Expand Up @@ -385,19 +385,6 @@ gchar * gnc_timespec_to_iso8601_buff (Timespec ts, gchar * buff);
*/
void gnc_timespec2dmy (Timespec ts, gint *day, gint *month, gint *year);

/** The gnc_timezone function returns the number of seconds *west*
* of UTC represented by the tm argument, adjusted for daylight
* savings time.
*
* This function requires a tm argument returned by localtime or set
* by mktime. This is a strange function! It requires that localtime
* or mktime be called before use. Subsequent calls to localtime or
* mktime *may* invalidate the result! The actual contents of tm *may*
* be used for both timezone offset and daylight savings time, or only
* daylight savings time! Timezone stuff under unix is not
* standardized and is a big mess.
*/
glong gnc_timezone (const struct tm *tm);
// @}

/* ------------------------------------------------------------------------ */
Expand Down

0 comments on commit e1e4391

Please sign in to comment.