Link to home
Start Free TrialLog in
Avatar of Troy Taylor
Troy TaylorFlag for United States of America

asked on

Unique Time Settings for one Domain PC

We have a process that runs on a domain PC that usually completes at 4AM in the morning and generates a time stamp on process records.  We'd like these records to show the previous day's date. The application developer tells us to simply set the clock on the PC accordingly so it is 5 hours behind current local time. The challenge is that since it's in the domain, the GPO keeps resetting the time.

Any suggestions on how to force this single PC to a different time setting?

Thanks,
  Troy Taylor
Avatar of Christopher Jay Wolff
Christopher Jay Wolff
Flag of United States of America image

I figure you want the files timestamp to change to previous day.  If you are familiar with Powershell, you can do it.  Depends on the details of your process of course.  After the process is done, add the type of Powershell script referred to here to change a file's timestamp.  This way your PC can keep the correct time, which should prove useful down the road.
http://blogs.technet.com/b/heyscriptingguy/archive/2012/06/01/use-powershell-to-modify-file-access-time-stamps.aspx

You may want to investigate the use of

 -Uformat parameter for Get-Date.  Open your powershell window and type ...

Get-Help Get-Date -full

and you will see a complete list of the parameters.

Is this helpful?  Please let us know.
I should have added that obviously in his script he is changing to the current time.  For your application, you would have to either pick a constant like 11:59pm previous day, and set all records to that, or backdate only day and date and hour leaving minutes alone.  Any number of ways.   If you are stamping records in a database you should have some System variables with which to work in your db, to get time.
ASKER CERTIFIED SOLUTION
Avatar of Troy Taylor
Troy Taylor
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Troy Taylor

ASKER

Sometimes the simple answer is the right one.