[gnome-panel] [clock] Do not use obsolete and unneeded daylight variable
- From: Vincent Untz <vuntz src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [gnome-panel] [clock] Do not use obsolete and unneeded daylight variable
- Date: Tue, 11 Aug 2009 18:50:15 +0000 (UTC)
commit fc523617a77d8dfb2507e2c6bf3a05d873c8a1eb
Author: Alexis Ballier <aballier gentoo org>
Date: Tue Aug 11 20:49:29 2009 +0200
[clock] Do not use obsolete and unneeded daylight variable
tm_isdst is enough: if it's positive, then we're in DST, else we're not
(or we don't know, which we handle the same way).
http://bugzilla.gnome.org/show_bug.cgi?id=577831
applets/clock/clock-location.c | 2 +-
applets/clock/clock.c | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/applets/clock/clock-location.c b/applets/clock/clock-location.c
index 20d58f3..4464be9 100644
--- a/applets/clock/clock-location.c
+++ b/applets/clock/clock-location.c
@@ -338,7 +338,7 @@ clock_location_set_tz (ClockLocation *this)
now_t = time (NULL);
localtime_r (&now_t, &now);
- if (daylight && now.tm_isdst) {
+ if (now.tm_isdst > 0) {
clock_location_set_tzname (this, tzname[1]);
} else {
clock_location_set_tzname (this, tzname[0]);
diff --git a/applets/clock/clock.c b/applets/clock/clock.c
index e264a54..ab199f1 100644
--- a/applets/clock/clock.c
+++ b/applets/clock/clock.c
@@ -679,7 +679,7 @@ update_tooltip (ClockData * cd)
time (&now_t);
localtime_r (&now_t, &now);
- if (daylight && now.tm_isdst) {
+ if (now.tm_isdst > 0) {
zone = tzname[1];
} else {
zone = tzname[0];
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]