diff options
author | Miika Turkia <miika.turkia@gmail.com> | 2017-09-10 11:09:28 +0300 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2017-09-11 07:19:57 -0700 |
commit | 25fc72e22ff4104d08f2f7c5acc252a84ebfcc40 (patch) | |
tree | beb57f011b54d194dca6bd5760d476577c17bdd4 | |
parent | d7c89a79f81653e45907a13f3d802a6df9a2aad4 (diff) | |
download | subsurface-25fc72e22ff4104d08f2f7c5acc252a84ebfcc40.tar.gz |
Do not save non-existent time
Note that git storage still encodes the time into file name.
Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
-rw-r--r-- | core/save-xml.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/core/save-xml.c b/core/save-xml.c index 84530a749..df6b99eb1 100644 --- a/core/save-xml.c +++ b/core/save-xml.c @@ -354,8 +354,9 @@ static void show_date(struct membuffer *b, timestamp_t when) put_format(b, " date='%04u-%02u-%02u'", tm.tm_year, tm.tm_mon + 1, tm.tm_mday); - put_format(b, " time='%02u:%02u:%02u'", - tm.tm_hour, tm.tm_min, tm.tm_sec); + if (tm.tm_hour || tm.tm_min || tm.tm_sec) + put_format(b, " time='%02u:%02u:%02u'", + tm.tm_hour, tm.tm_min, tm.tm_sec); } static void save_samples(struct membuffer *b, struct dive *dive, struct divecomputer *dc) |