Set timezone compatible with previous version. Patch from N. Boullis.
This commit is contained in:
@@ -337,13 +337,15 @@ iso9660_set_dtime_with_timezone (const struct tm *p_tm,
|
|||||||
void
|
void
|
||||||
iso9660_set_dtime(const struct tm *p_tm, /*out*/ iso9660_dtime_t *p_idr_date)
|
iso9660_set_dtime(const struct tm *p_tm, /*out*/ iso9660_dtime_t *p_idr_date)
|
||||||
{
|
{
|
||||||
int time_zone;
|
int time_zone = 0;
|
||||||
|
if (p_tm) {
|
||||||
#ifdef HAVE_TM_GMTOFF
|
#ifdef HAVE_TM_GMTOFF
|
||||||
/* Convert seconds to minutes */
|
/* Convert seconds to minutes */
|
||||||
time_zone = p_tm->tm_gmtoff / 60;
|
time_zone = p_tm->tm_gmtoff / 60;
|
||||||
#else
|
#else
|
||||||
time_zone = (p_tm->tm_isdst > 0) ? -60 : 0;
|
time_zone = (p_tm->tm_isdst > 0) ? -60 : 0;
|
||||||
#endif
|
#endif
|
||||||
|
}
|
||||||
iso9660_set_dtime_with_timezone (p_tm, time_zone, p_idr_date);
|
iso9660_set_dtime_with_timezone (p_tm, time_zone, p_idr_date);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -390,13 +392,15 @@ iso9660_set_ltime_with_timezone (const struct tm *p_tm,
|
|||||||
void
|
void
|
||||||
iso9660_set_ltime(const struct tm *p_tm, /*out*/ iso9660_ltime_t *pvd_date)
|
iso9660_set_ltime(const struct tm *p_tm, /*out*/ iso9660_ltime_t *pvd_date)
|
||||||
{
|
{
|
||||||
int time_zone;
|
int time_zone = 0;
|
||||||
|
if (p_tm) {
|
||||||
#ifdef HAVE_TM_GMTOFF
|
#ifdef HAVE_TM_GMTOFF
|
||||||
/* Set time zone in 15-minute interval encoding. */
|
/* Set time zone in 15-minute interval encoding. */
|
||||||
time_zone = p_tm->tm_gmtoff / 60;
|
time_zone = p_tm->tm_gmtoff / 60;
|
||||||
#else
|
#else
|
||||||
time_zone = (p_tm->tm_isdst > 0) ? -60 : 0;
|
time_zone = (p_tm->tm_isdst > 0) ? -60 : 0;
|
||||||
#endif
|
#endif
|
||||||
|
}
|
||||||
iso9660_set_ltime_with_timezone (p_tm, time_zone, pvd_date);
|
iso9660_set_ltime_with_timezone (p_tm, time_zone, pvd_date);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -666,8 +670,8 @@ iso9660_set_pvd(void *pd,
|
|||||||
iso9660_set_ltime (&temp_tm, &(ipd.creation_date));
|
iso9660_set_ltime (&temp_tm, &(ipd.creation_date));
|
||||||
gmtime_r(pvd_time, &temp_tm);
|
gmtime_r(pvd_time, &temp_tm);
|
||||||
iso9660_set_ltime (&temp_tm, &(ipd.modification_date));
|
iso9660_set_ltime (&temp_tm, &(ipd.modification_date));
|
||||||
iso9660_set_ltime (&temp_tm, &(ipd.expiration_date));
|
iso9660_set_ltime (NULL, &(ipd.expiration_date));
|
||||||
iso9660_set_ltime (&temp_tm, &(ipd.effective_date));
|
iso9660_set_ltime (NULL, &(ipd.effective_date));
|
||||||
|
|
||||||
ipd.file_structure_version = to_711(1);
|
ipd.file_structure_version = to_711(1);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user