mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
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>
This commit is contained in:
parent
d7c89a79f8
commit
25fc72e22f
1 changed files with 3 additions and 2 deletions
|
@ -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)
|
||||
|
|
Loading…
Add table
Reference in a new issue