Skip to content

Commit

Permalink
Merge pull request #41 from anarcat/fixdelay
Browse files Browse the repository at this point in the history
set time structure at the right moment
  • Loading branch information
xorg62 committed Jan 13, 2017
2 parents 3fe38e9 + 59f358f commit 9fe5fe3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion ttyclock.c
Expand Up @@ -182,11 +182,11 @@ update_hour(void)
int ihour;
char tmpstr[128];

ttyclock->lt = time(NULL);
ttyclock->tm = localtime(&(ttyclock->lt));
if(ttyclock->option.utc) {
ttyclock->tm = gmtime(&(ttyclock->lt));
}
ttyclock->lt = time(NULL);

ihour = ttyclock->tm->tm_hour;

Expand Down

0 comments on commit 9fe5fe3

Please sign in to comment.