Start set/get time routines that tolerate no timezone structure in

struct tm. Solaris is like that. (I think cygwin too.)
This commit is contained in:
R. Bernstein
2009-12-23 08:49:58 -05:00
parent 1d609ef8aa
commit f996d202b8
3 changed files with 75 additions and 29 deletions

View File

@@ -651,11 +651,11 @@ typedef struct _iso9660_s iso9660_t;
bool iso9660_ifs_read_pvd (const iso9660_t *p_iso,
/*out*/ iso9660_pvd_t *p_pvd);
/*!
Read the Super block of an ISO 9660 image. This is the
Primary Volume Descriptor (PVD) and perhaps a Supplemental Volume
Descriptor if (Joliet) extensions are acceptable.
*/
/*!
Read the Super block of an ISO 9660 image. This is the
Primary Volume Descriptor (PVD) and perhaps a Supplemental Volume
Descriptor if (Joliet) extensions are acceptable.
*/
bool iso9660_fs_read_superblock (CdIo_t *p_cdio,
iso_extension_mask_t iso_extension_mask);
@@ -671,19 +671,37 @@ typedef struct _iso9660_s iso9660_t;
/*====================================================
Time conversion
====================================================*/
/*!
Set time in format used in ISO 9660 directory index record
from a Unix time structure. */
/*!
Set time in format used in ISO 9660 directory index record
from a Unix time structure.
*/
void iso9660_set_dtime (const struct tm *tm,
/*out*/ iso9660_dtime_t *idr_date);
/*!
Set time in format used in ISO 9660 directory index record
from a Unix time structure. timezone is given as an offset
correction in minutes.
*/
void iso9660_set_dtime_with_timezone (const struct tm *p_tm,
int timezone,
/*out*/ iso9660_dtime_t *p_idr_date);
/*!
Set "long" time in format used in ISO 9660 primary volume descriptor
from a Unix time structure. */
void iso9660_set_ltime (const struct tm *_tm,
/*out*/ iso9660_ltime_t *p_pvd_date);
/*!
Set "long" time in format used in ISO 9660 primary volume descriptor
from a Unix time structure. */
void iso9660_set_ltime_with_timezone (const struct tm *_tm,
int timezone,
/*out*/ iso9660_ltime_t *p_pvd_date);
/*!
Get Unix time structure from format use in an ISO 9660 directory index
record. Even though tm_wday and tm_yday fields are not explicitly in