1.

Solve : Batch file to disable Daylight saving time for remote machine?

Answer»

This may help you:

Code: [Select]c:\>tzutil /?
Windows Time Zone UTILITY

Usage:
TZUTIL </? | /g | /s TimeZoneID[_dstoff] | /l>

Parameters:
/? Displays usage information.

/g Displays the current time zone ID.

/s TimeZoneID[_dstoff]
Sets the current time zone using the specified time zone ID.
The _dstoff suffix disables Daylight Saving Time adjustments
for the time zone (where applicable).

/l Lists all valid time zone IDs and display names. The output will
be:
<display name>
<time zone ID>

Examples:
TZUTIL /g
TZUTIL /s "Pacific Standard Time"
TZUTIL /s "Pacific Standard Time_dstoff"

Remarks:
An exit code of 0 indicates the command completed successfully.The Windows Time Zone Utility is available as a download from MS.
http://www.microsoft.com/en-us/download/details.aspx?id=25166
However, it may have issues:
http://blogs.msdn.com/b/cjacks/archive/2009/12/16/windows-7-debugging-demo-troubleshooting-the-broken-microsoft-time-zone-utility.aspx
Here is a command line example:
http://stackoverflow.com/questions/16656229/how-do-i-set-the-timezone-from-command-line

Bear in mind that the eastern Europe usage is not universal. And in other areas also. This year is a real mind bender.

Daylight Saving Time Around the World 2015


Rather than pure batch, MANY administrators are using Powershell.
Powershell is in all current versions of Windows and has many features from the .NET library.
A few:
https://gist.github.com/chrisbenti/11036644
http://stackoverflow.com/questions/11035905/powershell-display-current-time-with-time-zone
https://technet.microsoft.com/en-us/library/hh849887.aspx
http://powershell.com/cs/blogs/tips/archive/2013/08/13/changing-current-time-zone.aspx
As can been seen, the scripts are not trivial. So pure batch may be very hard, if even possible. IMHO the Powershell scripts should be considered.

Sorry, I can not do the code for you. I am very slow to code. I takes me three days to do what some here can do in an afternoon.
Quote from: Geek-9pm on September 12, 2015, 10:01:53 PM

The Windows Time Zone Utility is available as a download from MS.
http://www.microsoft.com/en-us/download/details.aspx?id=25166
However, it may have issues:
http://blogs.msdn.com/b/cjacks/archive/2009/12/16/windows-7-debugging-demo-troubleshooting-the-broken-microsoft-time-zone-utility.aspx

You've made it very easy for me to check by providing the links - and those refer to downloads for XP (and server 2003).

Just commenting here if people stumble across this thread looking for info in the future, that it's not for current versions of Windows.

I do see that Abo-Zead is using XP though.Hope you can help him.
In non-western countries, the DST is more difficult.
Local conditions alter the way it is used. Microsoft is aware of the problem and has some information about how to fix it for Egypt this year.
Last year:
2014 - Egypt Ramadan DST changes - Fix it
This yer:
2015 - Egypt DST changes - hotfix
I found these with a Google on:
how does windows do DST in Egypt
It seems many administrators in Egypt have issues with DST.
Dear all,

thank you for your assistance and APPRECIATE that and after explore some pages that you provide it to me i understood a little of things And I hope that you read my post carefully well So i'll explain my issue again ( all machines have synchronized with the server in time but some times some machines lost this syncing and enable daylight saving time I mean +1 hour but all machines have the same time zone even the machines that lost syncing ( Egypt Standard Time ) and and i want to return the time as before by disabling daylight saving time or by any way so i did restart it remotely to re-syncing and nothing happened and create the batch attached to disable DST and restart it remotely and also nothing happened, only the remote access can do that but i want to do that by using remotely batch.
NOT: my created batch can disable DST for remotely machine but can't apply that actually as figures in the first post.
: machines have Windows XP SP2.

So Could any one create a batch to disable DST and apply that for remotely machine actually .

thanks again for your supportThis may be of interest:
http://www.timeanddate.com/worldclock/egypt/alexandria

Alexandria, Egypt does not use the DST of Cairo.
My guess is that Windows has some problem doing DST for Egypt. And remember that Windows XP is no longer supported by Microsoft.

Therefore, you may have to set all machines to Alexandria, Egypt. Doing so should SHUT off the DST.

I can not test this. Here is another reference:
https://www.microsoft.com/resources/documentation/windows/xp/all/proddocs/en-us/int_pr_custom_workspace_regionalsettings.mspx?mfr=true
From there go to the place where is says:
Change the way your computer displays the time

Speculation: Setting the time off by twenty minuets may cause the machine to sync again with the server.

Please keep us posted.

EDIT:
Try this Google search:
https://www.google.com/search?q=force+remote+XP++to+not+use+DST&ie=utf-8&oe=utf-8
It seems the XP DST trouble is not limited to Egypt or any location. It is impossible to turn off DST in Windows XP by remote. One of the links mentions Egypt, but the problem is also in other places.
http://itproafrica.com/technology/windows/disabling-daytime-savings-microsoft-windows-egypt-dst/
Dear all,

could any one help me to do this code " TZUTIL /s "Pacific Standard Time_dstoff" in remotely machine.

by batch file onlyQuote from: Abo-Zead on September 23, 2015, 10:18:44 PM
could any one help me to do this code " TZUTIL /s "Pacific Standard Time_dstoff" in remotely machine.
by batch file only

What remote access software can be used? PSEXEC?

Edit:

It looks like tzutil is not a tool that you can use on XP.

https://technet.microsoft.com/en-us/library/hh825053.aspx
Applies To: Windows 8, Windows 8.1, Windows Server 2012, Windows Server 2012 R2


Discussion

No Comment Found