mirror of
https://github.com/subsurface/subsurface.git
synced 2024-12-01 06:30:26 +00:00
Fix the incorrect data type for DIVE_DATE accesses
This is the same bugfix that Lubomir did in the master branch, but now on top of the new 64-bit timestamp_t model. So now we also remove the comment about the year 2038 problem, because it's not true any more. We do all the date handling in a 64-bit integer. Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
This commit is contained in:
parent
dce08deb34
commit
d66d376d20
1 changed files with 2 additions and 4 deletions
|
@ -378,15 +378,13 @@ static void date_data_func(GtkTreeViewColumn *col,
|
||||||
GtkTreeIter *iter,
|
GtkTreeIter *iter,
|
||||||
gpointer data)
|
gpointer data)
|
||||||
{
|
{
|
||||||
int val, idx, nr;
|
int idx, nr;
|
||||||
struct tm tm;
|
struct tm tm;
|
||||||
timestamp_t when;
|
timestamp_t when;
|
||||||
char buffer[40];
|
char buffer[40];
|
||||||
|
|
||||||
gtk_tree_model_get(model, iter, DIVE_INDEX, &idx, DIVE_DATE, &val, -1);
|
gtk_tree_model_get(model, iter, DIVE_INDEX, &idx, DIVE_DATE, &when, -1);
|
||||||
nr = gtk_tree_model_iter_n_children(model, iter);
|
nr = gtk_tree_model_iter_n_children(model, iter);
|
||||||
/* 2038 problem */
|
|
||||||
when = val;
|
|
||||||
|
|
||||||
utc_mkdate(when, &tm);
|
utc_mkdate(when, &tm);
|
||||||
if (idx < 0) {
|
if (idx < 0) {
|
||||||
|
|
Loading…
Reference in a new issue