Author Topic: WinBatch Studio and time change  (Read 9566 times)

PaulSamuelson

  • Newbie
  • *
  • Posts: 40
WinBatch Studio and time change
« on: March 09, 2014, 07:48:56 pm »
Whenever the time changes, WinBatch Studio thinks open files were changed outside of Studio and asks if they should be reloaded.

Thanks,

Paul

snowsnowsnow

  • Sr. Member
  • ****
  • Posts: 313
Re: WinBatch Studio and time change
« Reply #1 on: March 10, 2014, 01:19:52 am »
I assume by "time changes", you are referring to the recent DST change.  Otherwise, I'd be obliged to point out that the time is always changing.  Time marches on.  TIme & tides wait for no man.  Etc, etc.

Anyway, yes, this is common behavior in (some/most) editors.   I've seen it in vi.  It makes sense when you think about it.

td

  • Tech Support
  • *****
  • Posts: 3453
    • WinBatch
Re: WinBatch Studio and time change
« Reply #2 on: March 10, 2014, 06:54:06 am »
Now if the theoretical physicists and cosmologists could only come up with the math to explain why time only goes in one direction... 
"No one who sees a peregrine falcon fly can ever forget the beauty and thrill of that flight."
  - Dr. Tom Cade

JTaylor

  • Pundit
  • *****
  • Posts: 1361
    • Data & Stuff Inc.
Re: WinBatch Studio and time change
« Reply #3 on: March 10, 2014, 07:41:37 am »
I think it is because we tend to screw things up bad enough the first time around...would really be a mess if we had a chance to do it more than once  ;)

Jim

kdmoyers

  • Sr. Member
  • ****
  • Posts: 339
Re: WinBatch Studio and time change
« Reply #4 on: March 10, 2014, 08:33:27 am »
I dunno, it eventually worked out for Bill Murray.
The mind is everything; What you think, you become.

ChuckC

  • Full Member
  • ***
  • Posts: 247
Re: WinBatch Studio and time change
« Reply #5 on: March 10, 2014, 08:36:22 am »
Now if the theoretical physicists and cosmologists could only come up with the math to explain why time only goes in one direction...

It is quite possibly an artifact caused by the expanding nature of the universe, with the unidirectional nature of time being tied to the outward expansion.  If gravity wins out in the end, counters expansion and causes a gravitational collapse of the universe, perhaps time will run backwards...

td

  • Tech Support
  • *****
  • Posts: 3453
    • WinBatch
Re: WinBatch Studio and time change
« Reply #6 on: March 10, 2014, 10:27:29 am »
Of course, that whole dark energy business could really throw a wrench into a gravitational victory.
"No one who sees a peregrine falcon fly can ever forget the beauty and thrill of that flight."
  - Dr. Tom Cade

kdmoyers

  • Sr. Member
  • ****
  • Posts: 339
Re: WinBatch Studio and time change
« Reply #7 on: March 10, 2014, 11:40:32 am »
It is quite possibly an artifact caused by the expanding nature of the universe, with the unidirectional nature of time being tied to the outward expansion.  If gravity wins out in the end, counters expansion and causes a gravitational collapse of the universe, perhaps time will run backwards...
Now that *is* interesting.  I wonder if, on the back half when things are collapsing, creatures would experience free will much as we do now, except that the laws of thermodynamics would run the other way. 
The mind is everything; What you think, you become.

ChuckC

  • Full Member
  • ***
  • Posts: 247
Re: WinBatch Studio and time change
« Reply #8 on: March 10, 2014, 11:46:26 am »
Of course, that whole dark energy business could really throw a wrench into a gravitational victory.

Yeah, if dark energy actually accelerates the expansion and defeats gravity in the process, then it begs the question as to whether or not time would remain constant or if it would accelerate as well.

It's these kinds of theoretical rabbit holes that seem to break some people who entertain thoughts of becoming a theoretical astrophysicist...


....IFICantBYTE

  • Full Member
  • ***
  • Posts: 122
Re: WinBatch Studio and time change
« Reply #9 on: March 10, 2014, 05:58:19 pm »
If you are talking Einstein Spacetime (time dilation), then Time does NOT seem to be constant and can be altered by gravity or speed (so long as you are observing or calculating it for somone else -  :) relativity).
If you are entertaining the newer and more wacky branches of physics then perhaps time may not exist at all except as a way for us to make sense of, and to reference, all that just IS ..... a bit like numbers, or the concept of infinity.
Regards,
....IFICantBYTE

Nothing sucks more than that moment during an argument when you realize you're wrong. :)

stanl

  • Pundit
  • *****
  • Posts: 1164
Re: WinBatch Studio and time change
« Reply #10 on: March 11, 2014, 06:22:03 am »
Might as well misquote Bismarck [again] -  Time is like sausages, you really shouldn't see how it's made

snowsnowsnow

  • Sr. Member
  • ****
  • Posts: 313
Re: WinBatch Studio and time change
« Reply #11 on: March 11, 2014, 06:25:30 am »
I am happy to see that this thread took off in a direction inspired by my first response.

Well done, guys!

PaulSamuelson

  • Newbie
  • *
  • Posts: 40
Re: WinBatch Studio and time change
« Reply #12 on: March 11, 2014, 07:01:42 am »
So I guess the conclusion is Studio's request to reload files is pretty insignificant when it comes to the bigger questions of time...

ChuckC

  • Full Member
  • ***
  • Posts: 247
Re: WinBatch Studio and time change
« Reply #13 on: March 11, 2014, 08:48:46 am »
So I guess the conclusion is Studio's request to reload files is pretty insignificant when it comes to the bigger questions of time...

I suppose it's all matter of scale and perspective...


As for the actual issue that you posted about, it probably depends on whether or not the file's time stamp is being stored in memory and compared with the time stamp value on disk as a local time or as a UTC time.  If it were done as a UTC time and simply displayed as a local time with adjustments made for the local time zone and DST offset, then you wouldn't see this behavior.  However, if the time stamp values that are obtained from disk initially and then again later on for comparison have the "local time" adjustments made to them, then a transition between standard time to daylight savings time will result in apparently different times if the current locality observes DST.

I suppose it would be helpful if Tony or Deana could confirm that this is what WinBatch Studio is actually doing.

JTaylor

  • Pundit
  • *****
  • Posts: 1361
    • Data & Stuff Inc.
Re: WinBatch Studio and time change
« Reply #14 on: March 11, 2014, 08:49:59 am »
I would guess that it is difficult to definitively determine whether the change was because of the Time Change or not.  Assumptions could be made but we all know how that often goes.  The actual time stamp on the file changes so that triggers the reload question just like it would for any other timestamp change.  Also, not sure trying to code into one's program the ability to determine when Daylight Savings is going to occur is very feasible.

Jim

td

  • Tech Support
  • *****
  • Posts: 3453
    • WinBatch
Re: WinBatch Studio and time change
« Reply #15 on: March 11, 2014, 10:03:04 am »
So I guess the conclusion is Studio's request to reload files is pretty insignificant when it comes to the bigger questions of time...

I suppose it's all matter of scale and perspective...


As for the actual issue that you posted about, it probably depends on whether or not the file's time stamp is being stored in memory and compared with the time stamp value on disk as a local time or as a UTC time.  If it were done as a UTC time and simply displayed as a local time with adjustments made for the local time zone and DST offset, then you wouldn't see this behavior.  However, if the time stamp values that are obtained from disk initially and then again later on for comparison have the "local time" adjustments made to them, then a transition between standard time to daylight savings time will result in apparently different times if the current locality observes DST.

I suppose it would be helpful if Tony or Deana could confirm that this is what WinBatch Studio is actually doing.

WinBatch Studio is an MFC application so it relies on that library's CFileStatus C++ class to determine if a file's modification date has changed.  Basically, if MSFT's class says a file's modify time has changed, WinBatch Studio will act accordingly.   One obvious solution is to not leave WinBatch Studio running on the two relevant nights of the year or if you are a night-owl, save your work and then close and reopen WinBatch Studio immediately after the clock strikes two on the afore mentioned nights.
"No one who sees a peregrine falcon fly can ever forget the beauty and thrill of that flight."
  - Dr. Tom Cade

snowsnowsnow

  • Sr. Member
  • ****
  • Posts: 313
Re: WinBatch Studio and time change
« Reply #16 on: March 11, 2014, 01:43:41 pm »
Or just accept that it happens and say "Yes" to all the prompts.

I did just now (today) get hit with this with GVIM - luckily, it has a "Load All" option that quickly reloads all affected buffers.

td

  • Tech Support
  • *****
  • Posts: 3453
    • WinBatch
Re: WinBatch Studio and time change
« Reply #17 on: March 11, 2014, 02:24:11 pm »
Good point.  I don't ever leave a workstation or notebook (let alone WinBatch Studio) running over night so I have never dealt with the problem.  It is not too difficult to imagine getting a bit irritated after about the 20th click/key press or so.  Not all of us can count patiences as a virtue.
"No one who sees a peregrine falcon fly can ever forget the beauty and thrill of that flight."
  - Dr. Tom Cade

snowsnowsnow

  • Sr. Member
  • ****
  • Posts: 313
Re: WinBatch Studio and time change
« Reply #18 on: March 11, 2014, 08:00:47 pm »
Write a WB script to click away all those prompts…


I'm surprised that you never leave your machines on over night.  I do it all the time…

td

  • Tech Support
  • *****
  • Posts: 3453
    • WinBatch
Re: WinBatch Studio and time change
« Reply #19 on: March 12, 2014, 07:52:38 am »
Write a WB script to click away all those prompts…

You still have to wait for each one to appear and be dismissed.  Because the dialog gets displayed during idle processing that has a convoluted algorithm for determining when idle events like a the box display will occure, it could get very frustrating trying to use the editor while having a script dismiss the boxes. 

Quote
I'm surprised that you never leave your machines on over night.  I do it all the time…

No reason to and several reasons not to.
"No one who sees a peregrine falcon fly can ever forget the beauty and thrill of that flight."
  - Dr. Tom Cade