Skip to content
This repository has been archived by the owner on Dec 15, 2021. It is now read-only.

Commit

Permalink
Conver GTime to t_time before calling gmtime()
Browse files Browse the repository at this point in the history
  • Loading branch information
Jajcus committed Jul 25, 2013
1 parent 80b5247 commit 1f44594
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/presence.c
Original file line number Diff line number Diff line change
Expand Up @@ -190,10 +190,11 @@ xmlnode n;
}
if (timestamp){
struct tm *tm;
time_t ttime = timestamp;
char buf[101];
n=xmlnode_insert_tag(pres,"x");
xmlnode_put_attrib(n,"xmlns","jabber:x:delay");
tm=gmtime(&timestamp);
tm=gmtime(&ttime);
strftime(buf,100,"%Y%m%dT%H:%M:%S",tm);
xmlnode_put_attrib(n,"stamp",buf);
xmlnode_insert_cdata(n,"Presence update time",-1);
Expand Down

0 comments on commit 1f44594

Please sign in to comment.