mirror of
https://github.com/Gnucash/gnucash.git
synced 2025-02-25 18:55:30 -06:00
Remove unused gnc_timezone function.
This commit is contained in:
parent
f4451ff57d
commit
e1e4391b03
@ -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 )
|
||||
{
|
||||
|
@ -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);
|
||||
// @}
|
||||
|
||||
/* ------------------------------------------------------------------------ */
|
||||
|
Loading…
Reference in New Issue
Block a user