[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Weird time-zone oscillation



On 12/13/2009 04:51 PM, Kumar Appaiah wrote:
On Sun, Dec 13, 2009 at 04:25:22PM +0100, Torben Keil wrote:
I have a weird time-zone related issue on my machine. [...]

A user on my workplace reported me similar problem with the time-zone in
SuSE 11.1. I just had the current NVIDIA-driver installed (190.X) and after
a quater hour the user reported to me that there's an issue with the clock
in the KDE-window.

I had a fast look at the system and found nothing obviously.
At that time I was very busy so that I decided to have a deeper look at htis
system later on.
After some hours the problem disapeared and I did not have a deeper look.

So may be - an NVIDIA-driver issue?

Can't be, as there isn't a trace of Nvidianess on my system; software
or hardware! ;-)


Thanks!

Kumar

Greetings from TZ=Europe/Berlin

Hello from TZ=America/Chicago. :-)

Kumar

It may be your glib, but you didn't say if this also happens when using just POSIX API (basic libc). If it's affected too, your system is borked on a lower level. What you report is impossible unless there is a serious bug (or rather data corrution) somewhere.

I'm attaching a piece of code, same as yours except pure libc instead of glib. Please, try it out and let me know whether it has the same issues.

After that, I'd make sure all relevant packages in your system are up-to-date and not corrupted. You may want to "refresh" these:

# apt-get update
# apt-get install --reinstall libc6 tzdata libglib2.0-0 libglib2.0-data

When we're sure relevant libraries are OK, we can explore other possibilities if the issue persists. I doubt it will after this action, unless, of course, you have some very peculiar configuration I cannot imagine somewhere. :)


--
David Kubicek
#include <stdio.h>
#include <time.h>

void main(void) {
	char *iso_date = "2009-12-11T2:50:00";
	struct tm tm;
	time_t time;

	strptime(iso_date, "%FT%T%z", &tm);
	time = mktime(&tm);
	printf("%ld\n", time);
}

Reply to: