commit | 1001d28a86a6dd5bb64ccfd405606bba122dd8a3 | [log] [tgz] |
---|---|---|
author | akmhoque <akmhoque@gmail.com> | Thu Oct 11 04:11:33 2012 -0500 |
committer | akmhoque <akmhoque@gmail.com> | Thu Oct 11 04:11:33 2012 -0500 |
tree | 7a60a9200b76e6a1467effae614cab20b9f793ce | |
parent | c7ec124c5eaf0f8d6846fea859de23f4166e49b2 [diff] |
update in timestamp
diff --git a/utility.c b/utility.c index b136c67..1218623 100644 --- a/utility.c +++ b/utility.c
@@ -71,9 +71,14 @@ void get_current_timestamp_micro(char * microSec) { + time_t gtime; + gtime=time(NULL); + struct tm *tm; + tm=localtime(>ime); + struct timeval now; gettimeofday(&now, NULL); - sprintf(microSec,"%ld%06ld",now.tv_sec,(long int)now.tv_usec); + sprintf(microSec,"%ld%06ld",now.tv_sec-tm->tm_gmtoff,(long int)now.tv_usec); }