[Pkg-wmaker-commits] [wmbubble] 12/207: Fix Hacker Standard Time calculation
Doug Torrance
dtorrance-guest at moszumanska.debian.org
Mon Aug 24 04:17:51 UTC 2015
This is an automated email from the git hooks/post-receive script.
dtorrance-guest pushed a commit to branch master
in repository wmbubble.
commit 79ac4f1ce6cebdbc7ac284d83b84a3f68d4f0c30
Author: Robert Jacobs <rnjacobs at mit.edu>
Date: Mon Aug 29 22:26:26 2011 -0700
Fix Hacker Standard Time calculation
---
bubblemon.c | 12 ++++++++----
1 file changed, 8 insertions(+), 4 deletions(-)
diff --git a/bubblemon.c b/bubblemon.c
index 32e4bf9..46bade6 100644
--- a/bubblemon.c
+++ b/bubblemon.c
@@ -1234,15 +1234,19 @@ static void draw_datetime(unsigned char * rgbbuf) {
const char days[7][3]={"Sun","Mon","Tue","Wed","Thu","Fri","Sat"};
time_t mytt;
struct tm * mytime;
+ int mday=0, hours=0;
time(&mytt);
mytime = localtime(&mytt);
+ mday = mytime->tm_mday;
if (mytime->tm_hour<shifttime) {
- mytt-=86400;
- mytime = localtime(&mytt);
- mytime->tm_hour+=24;
- }
+ while (mday == mytime->tm_mday) {
+ mytt -= 3600; hours++;
+ mytime = localtime(&mytt);
+ }
+ mytime->tm_hour += hours;
+ }
/* Sat Jan 04 */
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-wmaker/wmbubble.git
More information about the Pkg-wmaker-commits
mailing list