Commit graph

14 commits

Author SHA1 Message Date
Colin Watson
14a2672e28 datetime: Fix handling of Irish timezone on map
The timezone map tries to highlight regions of the world that keep the
same time, approximating this by their non-daylight-savings UTC offset.
There's no reasonable API for this, and it goes wrong in various cases,
such as Irish Standard Time which is legally defined as the country's
summer time with a negative DST offset in winter.

Hardcoding this is unpleasant, but there doesn't seem to be a better
solution, and in any case there's already similar hardcoding implied by
the segmented map images in panels/datetime/data/timezone_*.png.  I've
tried to make it practical to fix other similar disagreements between
the detected offset and the groupings implied by map images, though for
now I've conservatively fixed only the case I'm familiar with.

Fixes: #1341
2021-12-17 14:49:24 +00:00
Colin Watson
1b874509a4 datetime: Remove tzname_daylight
The code that set it could only ever have worked by luck in some
timezones on some systems, and there's no API to obtain the information
we were trying to store in it.  Nothing uses it, so there's no point
trying to fix it.

tzname_normal is also unused, but slightly useful for debugging, so
rename it to tzname but otherwise keep it in place.
2021-12-17 14:48:45 +00:00
Robert Ancell
d71f705d77 datetime: Use g_auto for variables
https://bugzilla.gnome.org/show_bug.cgi?id=788221
2018-01-18 12:30:37 -02:00
Alan Coopersmith
f090d7e3a0 tz.c: compiler warning: implicit declaration of function ‘islower’
https://bugzilla.gnome.org/show_bug.cgi?id=783641

Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2017-06-12 16:54:35 +02:00
Bastien Nocera
557dc46d97 datetime: Load backward file from GResource
So it doesn't warn when not installed in the target prefix yet.

https://bugzilla.gnome.org/show_bug.cgi?id=752831
2015-07-26 23:48:48 +02:00
Daniel Mustieles
2c5951819d Updated FSF's address 2014-01-29 11:27:38 +01:00
Rui Matos
11d94b271b datetime: Restore TZ envvar as it was
tz_info_from_location() was changing the value of TZ, but not
restoring it when it was done checking data for it, and setting
the GMT timezone instead.

This meant that UTC time was displayed when the minute changed on
the wall clock.

https://bugzilla.gnome.org/show_bug.cgi?id=649568
2011-07-14 11:59:17 +01:00
Bastien Nocera
07e51912e6 datetime: Unset TZ after we're done
Just in case we call localtime() for something else...
2011-04-15 04:15:30 +01:00
Bastien Nocera
3e8afd5750 datetime: Add hacks to support all the TZs
On a recent Linux system, so all the existing timezones
(apart from factory and posixrules) are attached to a location,
or a GMT offset.

https://bugzilla.gnome.org/show_bug.cgi?id=644782
2011-04-15 02:40:21 +01:00
Bastien Nocera
8d15af48c8 datetime: Move backward TZ DB to tz.[ch]
So we can add hacks in one location
2011-04-15 02:40:20 +01:00
Kjartan Maraas
e50563f67c datetime: Fix GCC 4.6 warnings
https://bugzilla.gnome.org/show_bug.cgi?id=642810
2011-03-02 18:03:35 +00:00
Bastien Nocera
1bac073929 datetime: Fix compile-time warning 2010-09-20 18:21:03 +01:00
Thomas Wood
20a5421543 datetime: fix various memory leaks
- Add a function to free the timezone database
- Use setenv rather than putenv
- Add various missing free() calls
2010-07-16 13:53:34 +01:00
Thomas Wood
26ae0134cf datetime: add detection of location from map clicks 2010-06-28 10:58:43 +01:00