Daylight Savings Scrivening

I set the obvious Project Targets at the beginning of NaNoWriMo, including setting the session target to reset automatically each day, and setting the targets to be auto-calculated. I happened to be writing at 11:00pm tonight, the first day of Eastern Standard Time, and surprise, surprise, my targets reset then instead of when I expected them to reset, at midnight. I believe I also saw them successfully reset at midnight a couple of nights ago.

I don’t close Scrivener very often, so it has been running for at least the last couple of days. I can leave it running for another day if more data is required. My OS is MacOS 10.12.6, and the Scrivener version is 3.0.3.

Another issue with session targets resetting is that Scrivener tells me about it at least twice each time it happens, and it’s told me at least five times now. This may have something to do with Scrivener’s coming in and out of focus in Spaces as I switch around, without becoming active. (I use Total Spaces on top of Spaces.)

As an aside, I would love it if the project targets were dockable, maybe on the binder side of the UI layout.

It may well just be a one-off glitch between the system clock changing while the software was running, and it not getting the message. I cannot reproduce that using manual clock override tests to simulate a time change during the session. It shouldn’t happen again if so (maybe not even the next time the clocks change).

Since you’ve left the software running, one thing you could do to check to see if Scrivener has the wrong time is to create an item in the binder, and then check the accuracy of the Created field in the inspector’s metadata pane. If it is getting the wrong time from the system, I doubt there is any reason to leave it running in that state, I’d just reload the software. There isn’t much Scrivener itself can do about a scenario where it’s being fed incorrect data, naturally.

Unless you turned the feature off in the Appearance: Target Progress Bars: Options preference pane, removed the Quick Search tool from your toolbar or even hide the toolbar entirely, then you should be seeing both draft and session targets as progress bars in that widget. Refer to §11.5.3, Project Targets and the Quick Search Tool in the user manual PDF, for further information and screenshots. Park your mouse on the tool while writing, to keep the numbers visible, if that’s important to you.

I had just created one before I saw your reply, and the timestamp was correct–nor was the system clock off last night in any obvious way. I’m no great defender of MacOS these days, but a system clock glitch seems like an unlikely culprit. I’ll see what happens tonight at midnight.

Aha! I’ve seen the Quick Search tool looking like that (with the word count) before, but it just didn’t register. Thanks!

Yeah I would say the system clock would have been accurate (in fact I don’t know if an hour-off glitch could happen otherwise). I was more wondering if Scrivener “got the message” so to speak. It should have, but maybe for some reason it did not—and if so that’s going to be the part that’s probably a one-off issue.

Yeah, do let us know if you see this happening consistently now, but you shouldn’t, or we’d be hearing about it from everybody in a country with daylight saving time (and I’m English, so we’ve just switched from BST back to GMT).

There does seem to be a minor issue in Apple’s NSDate that I’ve never quite managed to work around, though, and NSDate is used to determine midnight. Here are the notes I made in my code about this:

Clearly that note about -midnightTomorrow hasn’t helped much. :frowning:

Sorry, I got distracted last night and wasn’t watching, but tonight at 11:00pm Scrivener reset my session target again. It’s also still doing the constant popups informing me that the session target counter was reset whenever I go into that space in (Total) Spaces. I think it will go on doing this until midnight. Last time I didn’t notice that it also resets my session word count every time I command-arrow over there, though I did notice it happening at midnight the other night.

Other than the early reset, session targets seem to be working normally; my project total increments correctly.

Hmm, this is very strange. I’ve tried testing myself and haven’t seen any issues, and I’ve checked the code and that explicitly checks for daylight saving time and adds time as necessary. It’s even stranger that you are getting all of those popups, since Scrivener only sends the notification when the counter is actually reset. Is it continually being reset in that hour?

If you go to the Options in Project Targets, is the session counter definitely set to reset at midnight?

Thanks and all the best,
Keith

Yes, though I only noticed that interesting side-effect last night. Specifically, when I navigated away using (Total) Spaces, and then back, it would pop up and reset my session to 0 words. This behavior stopped at midnight.

No, you’re right, when I went there it was set to 11pm, but I would not have set it to 11pm intentionally but to midnight. (I think it defaulted to midnight on its own.)

Maybe it fell back later. I don’t think I waited until Sunday to set the targets; I would have done it last Friday at the latest. I remember I had some odd problems setting up the targets: I don’t think I could see the automatic calculation option at first, and what I could set didn’t seem to take at first, either, but it eventually seemed to work.

Hopefully, you are taking manual Scriv backups or using some other technology to back up your projects?
:smiley: :smiley: :smiley:

Yes, I back up regularly. After accidentally closing Scrivener and also changing the session end time to midnight, it is now ending my sessions only once, at midnight. But speaking of backups, I decided to look at my project settings in a Time Machine backup from early Wednesday, while the issue was still happening. Back then the project targets were set up like this:

    <ProjectTargets Notify="Yes">
        <DraftTarget Type="Words" CountIncludedOnly="Yes" CurrentCompileGroupOnly="No" Deadline="2018-11-30 21:38:09 -0500" IgnoreDeadline="No">50000</DraftTarget>
        <SessionTarget Type="Words" CountDraftOnly="Yes" AllowNegatives="No" ResetType="Time" ResetTime="-1:00" DeterminedFromDeadline="Yes" WritingDays="" CanWriteOnDeadlineDate="Yes">1776</SessionTarget>
        <PreviousSession Words="297" Characters="1631" Date="2018-11-07 01:06:13 -0500"></PreviousSession>
    </ProjectTargets>

Now they are set up this way:

    <ProjectTargets Notify="Yes">
        <DraftTarget Type="Words" CountIncludedOnly="Yes" CurrentCompileGroupOnly="No" Deadline="2018-11-30 21:38:09 -0500" IgnoreDeadline="No">50000</DraftTarget>
        <SessionTarget Type="Words" CountDraftOnly="Yes" AllowNegatives="No" ResetType="Time" ResetTime="00:00" DeterminedFromDeadline="Yes" WritingDays="" CanWriteOnDeadlineDate="Yes">1799</SessionTarget>
        <PreviousSession Words="1259" Characters="6929" Date="2018-11-09 00:00:34 -0500"></PreviousSession>
    </ProjectTargets>

When I change the session reset time to 11pm in Scrivener now, I do not get a negative Reset Time; I get 23:00:

    <ProjectTargets Notify="Yes">
        <DraftTarget Type="Words" CountIncludedOnly="Yes" CurrentCompileGroupOnly="No" Deadline="2018-11-30 21:38:09 -0500" IgnoreDeadline="No">50000</DraftTarget>
        <SessionTarget Type="Words" CountDraftOnly="Yes" AllowNegatives="No" ResetType="Time" ResetTime="23:00" DeterminedFromDeadline="Yes" WritingDays="" CanWriteOnDeadlineDate="Yes">1799</SessionTarget>
        <PreviousSession Words="1259" Characters="6929" Date="2018-11-09 11:33:16 -0500"></PreviousSession>
    </ProjectTargets>

So I don’t think I initially set the reset time to 11pm; I think Scrivener fell it back somehow, creating the negative timestamp and causing my weird session reset issues (not evident in the PreviousSession for Wednesday because I kept writing after midnight).