How to fix inconsistent time or time-zone settings

If a program inserts a TZ variable into a system's environment variables, the system may report the wrong time zone and the wrong Daytime Savings Time setting. Here's how to remove a TZ variable.

Both Windows XP and Windows Server 2003 attempt to keep their system clocks current by periodically synchronizing

with a remote Internet time server—either time.windows.com or time.nist.gov. They usually perform this task once a week at a randomly selected time (to prevent congestion of the time servers).

However, if your system hasn't been able to synchronize its time information for more than a week, you'll be alerted. If that happens, the problem is usually due to the remote time server being overloaded, and corrects itself in short order.

One curious issue that appears on some systems is when applications report a time that is definitely not what the system is set to. The most obvious manifestation of this is in JavaScript (including browser implementations of it), where the system reports the wrong time zone and the wrong Daylight Savings Time (DST) setting. Even more puzzling, changing the time settings in Windows has no effect.

This happens if a program inserts a TZ variable into the system's environment variables, which you can see in My Computer | Properties | Advanced | Environment Variables. A TZ environment variable (for instance, TZ=UTC+2) overrides the system time zone and DST settings for many applications, including JavaScript. . .and since this is not technically a problem, most applications do not report it as being one. A TZ setting might be manually inserted into the system environment variable pool by an application, and many applications are aware of it and will honor it without reporting that they are doing so.

You can remove the TZ variable manually. If you're not sure if it has been set, the NSTIME application will warn you if it has and can provide you with other information about your system's local time-zone settings.

About the author: Serdar Yegulalp is editor of the  Windows Power Users Newsletter, which is devoted to hints, tips, tricks, news and goodies for Windows NT, Windows 2000 and Windows XP users and administrators. He has more than 10 years of Windows experience under his belt, and contributes regularly to SearchWinComputing.com and SearchSQLServer.com.

More information on this topic:


This was first published in September 2006

Dig deeper on Windows Disaster Recovery and Business Continuity

Pro+

Features

Enjoy the benefits of Pro+ membership, learn more and join.

0 comments

Oldest 

Forgot Password?

No problem! Submit your e-mail address below. We'll send you an email containing your password.

Your password has been sent to:

SearchServerVirtualization

SearchCloudComputing

SearchExchange

SearchSQLServer

SearchWinIT

SearchEnterpriseDesktop

SearchVirtualDesktop

Close