mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
Use a 64-bit 'timestamp_t' for all timestamps, rather than 'time_t'
This makes the time type unambiguous, and we can use G_TYPE_INT64 for it in the divelist too. It also implements a portable (and thread-safe) "utc_mkdate()" function that acts kind of like gmtime_r(), but using the 64-bit timestamp_t. It matches our original "utc_mktime()". Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
This commit is contained in:
parent
d14932058f
commit
dce08deb34
10 changed files with 195 additions and 114 deletions
4
file.c
4
file.c
|
@ -99,7 +99,7 @@ static int try_to_open_suunto(const char *filename, struct memblock *mem, GError
|
|||
return success;
|
||||
}
|
||||
|
||||
static time_t parse_date(const char *date)
|
||||
static timestamp_t parse_date(const char *date)
|
||||
{
|
||||
int hour, min, sec;
|
||||
struct tm tm;
|
||||
|
@ -171,7 +171,7 @@ static int try_to_open_csv(const char *filename, struct memblock *mem, enum csv_
|
|||
char *p = mem->buffer;
|
||||
char *header[8];
|
||||
int i, time;
|
||||
time_t date;
|
||||
timestamp_t date;
|
||||
struct dive *dive;
|
||||
|
||||
for (i = 0; i < 8; i++) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue