summaryrefslogtreecommitdiffstats
path: root/file.c
diff options
context:
space:
mode:
authorGravatar Linus Torvalds <torvalds@linux-foundation.org>2012-09-19 17:35:52 -0700
committerGravatar Linus Torvalds <torvalds@linux-foundation.org>2012-09-19 17:35:52 -0700
commitdce08deb34939eaed349d315777214c3181c1a8d (patch)
tree4c9695b79277edba4cbf1e75dbcc4bec026511b6 /file.c
parentd14932058f191de2a812a9b3b9ad87c5febd2b3e (diff)
downloadsubsurface-dce08deb34939eaed349d315777214c3181c1a8d.tar.gz
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>
Diffstat (limited to 'file.c')
-rw-r--r--file.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/file.c b/file.c
index ca39c8dd6..943be6f09 100644
--- a/file.c
+++ b/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++) {